How to check if a Magic Number is already used? - page 2

 
Alain Verleyen #:

Which defeat the purpose of using a magic number. What if I want to use the EA with different parameters on the same symbol/timeframe ?

Well, you can add more parameters to the creation of the CRC value, of course.

The actual implementation is of course depending on the use case, I did not intend to cover all of them, but to give a better approach, instead of using random number generator for your magic.
 
Scott Allen #:

Might want to add the EA name (either input or hard-coded variable) as input for that CRC as well, as you might have other EAs running on the same symbol and timeframe.

Yeah, it depends on your requirements. But since CRC will result in a 64 bit value, you can input whatever your requirements are for distinguishing your magic.