MagicNumber or MagicID is an integer so it cannot be too large. I have not checked the size limit on integers in MT4 but I think it is at least 16 bits so 2 raised to the 16th power is a reasonable maximum. Anything under 65536 should work. If an integer is 32 bit then 4294967296 is the maximum so up to 9 digits is fine or 10 digits if less than the maximum.
Of course you can always use 1 or 2 digits.
I will add a function to the EA to calculate the magic number based on currency pair and chart timeframe when time allows.
Robert
Quote:
Originally Posted by codybear
does it matter how many digits the magic number is?
|