Running two EAs on one account, magic numbers and the mess I made without them
Posted: Wed Oct 07, 2026 11:06 pm
Running two EAs on one account, magic numbers and the mess I made without them
I wanted to run two different strategies on the same account and learned the hard way about magic numbers. Every order an EA places can carry a number that identifies it. If both EAs use the same number, or none, they can start managing each other's trades.
What happened to me was one EA saw an open position and thought it was its own, so it moved the stop and closed it on its own logic. I came back to a pile of trades that didn't match either strategy's rules and it was hard to figure out which did what.
The fix was to give each EA its own magic number and make each one filter positions by its number and symbol before doing anything. I also made sure the risk per trade is calculated per EA, and I put a total open risk limit across both so they can't stack up at the same time on correlated pairs.
If you run more than one, also think about correlation. Two EAs both long EURUSD and GBPUSD is just one big trade in disguise.
I wanted to run two different strategies on the same account and learned the hard way about magic numbers. Every order an EA places can carry a number that identifies it. If both EAs use the same number, or none, they can start managing each other's trades.
What happened to me was one EA saw an open position and thought it was its own, so it moved the stop and closed it on its own logic. I came back to a pile of trades that didn't match either strategy's rules and it was hard to figure out which did what.
The fix was to give each EA its own magic number and make each one filter positions by its number and symbol before doing anything. I also made sure the risk per trade is calculated per EA, and I put a total open risk limit across both so they can't stack up at the same time on correlated pairs.
If you run more than one, also think about correlation. Two EAs both long EURUSD and GBPUSD is just one big trade in disguise.