How to check if a trade is there in related currencies
-
I want to have only one trade with a particular pair and related pairs in my trading account. For instance, when I have a EURUSD trade running, then the EA should not open a trade on a pair that has either EUR or USD as base or quote currency. That means EA will not open a trade on GPBUSD as USD is there and EA will not open a trade with EURAUD either as EUR is there. But EA may open a trade with CADJPY as the pair has no USD or EUR. How can I achieve this in fxdreema?
-
Here is some example where I extract the currencies from the symbol name of one trade:
https://fxdreema.com/shared/tT6MjUDEdAnother example:
https://fxdreema.com/shared/xPfLEwQSHere I have these global variables:

TradeSymbolName is a symbol name that is coming from somewhere... I don't know where, that's why I set it to two different values in blocks 3 and 6.
Then in block 4 (block 7 has the same code) I'm scanning all running trades that match one of the currencies in TradeSymbolName. If match is found, then TradeFound is set to true. -
Thanks. Will test it out
-