I've an EA that once it is activated, it will open a few positions gradually with a common MagicNumber, let's say it open 3 positions with a MagicNumber of 222 at a SAME currency pair, SAME timeframe, but DIFFERENT timing, DIFFERENT prices and DIFFERENT lotsizes. Later, these 3 positions are in losing position and I deactivate the 1st EA immediately. I decide to drop the existing 1st EA and use another 2nd EA to take control on the 3 positions to close each of the position in profit at different timing or in stages.
Question now is when I first activate the 1st EA, can I assign different MagicNumber for each position that it opens ? If yes, how to do it ?
My reason is that if the 2nd EA takes over the open positions, it can't differentiate the uniqueness of each of the 3 open positions as the 1st EA already pre-assigned a common standard MagicNumber number of 222.
What shall I do with such situations if I want to drop the 1st EA and let the 2nd EA to control on the 3 open positions ? Thanks
- Close By - Trade - MetaTrader 5 for Android
- Close By - Trade - MetaTrader 5 for iPhone
- Opening and Closing Positions - Trade - MetaTrader 5 for iPhone
Enter the same magic number to both EA's?
Daniela Bluemel:
Enter the same magic number to both EA's?
Enter the same magic number to both EA's?
My 2nd EA can only manage one position at a time, thus it cannot differentiate 3 open positions with a common magic number. I need help from the experts' advice on the solutions,
you can specify magic numbers via input parameters.
Marco vd Heijden:
you can specify magic numbers via input parameters.
Dear Marco vd Heijden, how to specify the magic numbers via input parameters ? Appreciate if you could guide me.you can specify magic numbers via input parameters.
In my scenario above, at my 1st EA (their standard MagicNumber is 222), what shall I key-in the MagicNumber in the 1st EA's input parameters ?
At my 2nd EA, what shall I key-in the MagicNumber in the 2nd EA's input parameters ?
Thanks
well you have to start by posting the current code.
if the magic numbers differ then the eas will handle only their own orders.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register