How to make "Set Current Markets" block not run on every symbol on the same tick? [MT5]
-
How do I make the "Set Current Markets" block not run on every symbol on the same tick? AKA, how can I prevent new trades from being placed on two correlated symbols when getting a signal on both of them?
I'm currently making a multi-symbol fx backtester EA that checks for the risk of each currency that's currently being traded. Sometimes I'll get a signal on two correlated symbols at the same time, and when that happens I only want it to run on one of them.
For example: The EA gets two signals to go short on both GBPSGD and GBPCAD at the same time. I've already made it so the EA stores that GBP has a trade open now and should ignore any other GBP trades in the future, but since the signal happened at the exact same time, they both think they're the first one to run and both GBPSGD and GBPCAD get executed.
Is there a way to make it so each symbol is only executed one after the other instead of all of them at once?
I hope this makes sense
-
Hello,
You can use the "No position" block to exclude all pairs after, for example, GBPUSD has been executed. This also works with multiple signals within the same tick cycle.