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.
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.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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 ?
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.
Is it effecting the result of EA if we put them the same magic number in two difference EA ?
If they run on the same account, then yes.