Rule to not allow trading in specific currencies, how to do it?
-
I would like to know if someone can show me how to create these rules, for example:
-
If I have a purchase in the EURUSD currency, then I cannot have another purchase in the USDCHF currency.
-
If I have 1 trade in EUR currency then I cannot have other trades in currencies that start with EUR.
-
If I have 1 trade in EURUSD currency then I cannot have other trades with any currency that contains EUR or USD.
Can you help me?
-
-
@ontradingx said in Rule to not allow trading in specific currencies, how to do it?:
I would like to know if someone can show me how to create these rules, for example:
-
If I have a purchase in the EURUSD currency, then I cannot have another purchase in the USDCHF currency.
-
If I have 1 trade in EUR currency then I cannot have other trades in currencies that start with EUR.
-
If I have 1 trade in EURUSD currency then I cannot have other trades with any currency that contains EUR or USD.
Can you help me?
I have ideas, but you'd have to use strings...
-
-
@tipsywisdom
no problem, i just want to solve it, can you express your idea, maybe in the form of a project for me to understand the logic? -
What about
If Trade > No Trade
-
@biztet
I didn't understand.
Maybe I expressed myself badly.If my EA has any open trades with EURUSD then:
Do not allow trading with Currencies that start with EUR
Do not allow trading with Currencies that start with USDI want to understand if there is any way to filter and block trades with currencies that start with EUR or USD.
-
Just guessing. Didn't try it.

-
@ontradingx The only way I can think of doing this is like this https://fxdreema.com/shared/R9JaaCAV use the pink for each blocks to get all trades in different trades into different variables, then check each variable before placing trade, reset variable when trade closed.