Metaquotes language: OrderMagicNumber() is not able to be modified

 
  • 22% (6)
  • 26% (7)
  • 48% (13)
  • 4% (1)
Total voters: 27
 
Modifying magic number is the same if you change your Identity Card Number !. It MUST be is illegal operation in my opinion. 
 
Of course it's not modifiable. There is no good reason to do that.
 

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.
 
tonny:
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.
Why ? Can you provide an example where it would be useful to modify the magic number ?
 
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. :-)
 
tonny:
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 :

Expert Advisor ID. It allows organizing analytical processing of trade orders. Each Expert Advisor can set its own unique ID when sending a trade request.

If an EA can modify magic number of existing trades (orders, positions, deals), how do you prevent another EA affect your trades including MagicNumber ?

 
Changing Magic# == Ridiculous.
 
It can be formulated in the code or manually to ensure a different chart ea never extracts same number as another. i.e. if its eurusd then it is represented by 1 then m15 by the number 15 so magic number can be 115 then at the end add level number like say 2 if it has reached level 2 so the final magic for level 2 trades on eurusd m15 becomes 1152. For other eas you can set magic lower than 100 so they will never match with the auto magic numbers.
 
Its not a must have feature but all im saying is that it adds flexibility.
Reason: