Multiple EA Instances

 

I ran the same EA on multiple charts and it starting doing some wacky things, what am I missing? And what is the 'magic number' for? I thought if I saved the ticket number in an external variable I could use that to identify the trades of individual EA's. Each EA has only one trade open at all and any time.


Thanks!

Tom

 
TC

Dont use ticket number for this - use MagicNumber, which is set in the OrderSend line.

Best to have this as an extern variable


See 'MagicNumber: "Magic" Identifier of the Order'


You can then use the same EA on multiple charts with different values for the MagicNumber (set in the extern variable list that pops up when you add an EA to a chart)


Good Luck

-BB-

 
BarrowBoy:
TC

Dont use ticket number for this - use MagicNumber, which is set in the OrderSend line.

Best to have this as an extern variable


See 'MagicNumber: "Magic" Identifier of the Order'


You can then use the same EA on multiple charts with different values for the MagicNumber (set in the extern variable list that pops up when you add an EA to a chart)


Good Luck

-BB-

Received and understood - thank you! However, this all implies that there is a sharing of the orders database among EA's. But external variables are not 'shared' among EA's, with this said, the confusing part for me is - How can the ticket number, when stored in an external, not be unique and sufficient to identify an order for a particular EA?
Reason: