- MQL5 Wizard: Development of trading robots for MetaTrader 5
- How to copy deals of successful traders in MetaTrader 5
- When MetaTrader 5 Web Terminal is indispensable
It is not worthy to name it as "magic" number. How can we call it "magic" while it is not even able to vary. I suggest to rename it "fixed number" or "ID number" or "dead number".
Okay let hear from expert. I disagree with angevoyageur that their is totally no need to be able to change magic number. I do think it could help in adding flexibility in multi level order management. As for magic number name i think they can just retain the current name but add editability.
When using multiple virtual stops such that if a trade meets a certain criteria then its magic is changed so that the next level section of code say manages it with different stops than the first level trades that havent yet met the criteria and have level one stops. :-)
MagicNumber is intended for an EA to recognize his trades (orders, positions, deals). Obviously if you turn away MagicNumber from its original purpose to manage your trades, immediately you encounter difficulties and limitations. For your example you have to manage some data structure internally, for your EA to manage your trades/stops.
From documentation of magic :
If an EA can modify magic number of existing trades (orders, positions, deals), how do you prevent another EA affect your trades including MagicNumber ?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use