Avoid trading correlated pair
-
Hi,
How can i avoid having a position if a closely related pair is already in trade? E.g if i already have EURUSD running, i do not want my EA on GBPUSD or AUDUSD to open a trade even if the signal is trigger.
Now i only have
- NO POSITION --> CONDITION --> BUY
I still want the "NO POSITION" as I do not want to open any trade if i have a current position in the pair the EA is running. I want to add in, the avoid similar currency rule.
Thank you
-
You can try this:

Please note that the yellow output is the one connected to the 'No trade' block.
-
Hi @l-andorrà
Thanks for the response. Can you help me understand your suggestion.
- The check trade count is suppose to be a separate block from my current block?
- The specify symbol EURUSD - does it mean for my EA that is running on GBPUSD chart i need to put GBPUSD to avoid opening a trade is EURUSD is running a trade?
-
My example was just that. I have no idea how it should be implemented in your project. Could you please share it to suggest you how to do it?
-
@l-andorrà I'm looking to do something very similar so I'll just reply here rather than make a new thread. Not sure if what you mentioned above will work, I was wondering if a "if order/trade" block would work instead?
Here's what I'm looking to do... lets say we are currently trading EURUSD. I do not want to enter any new trades in any pairs of EUR or USD until this trade is exited. That means even if a buy/sell condition occurs, it should be ignored on any EUR or USD pairs to avoid over-leveraging on one currency pair.
(example: I've had times where my bot Buys EURUSD, GBPUSD, NZDUSD, AUDUSD which makes me too dependent on USD)
-
@sauce Yes, that block would work as you need just by specifieng here all those symbols (comma separated) applicable to the condition:

-
@l-andorrà is there any way to make this an input that can be edited on the chart expert's properties rather than FXdreema? (I don't see the checkbox that's usually next a parameter as input)
I ask because I want to set this up for all 28 major forex pairs that I'm scanning, hence it will be a lot of typing of symbols. Is there a better way to do just all EUR pairs and all USD pairs for example, or do I have to write out all of the pairs specifically?
-
@sauce I guess there must be a more efficient way to do it, but I'm afraid you'll need a real programmer for that. I have no idea how to do it, sorry.

-
@l-andorrà thanks for trying! I wonder if @miki could help on this one?? (appreciated miki's help on my CSM project)
-
@sauce it depends on the project.
-
@miki lets say we are currently trading EURUSD. I do not want to enter any new trades in any pairs of EUR or USD until this trade is exited. That means even if a buy/sell condition occurs, it should be ignored on any EUR or USD pairs to avoid over-leveraging on one currency pair.
@l-andorrà suggested using "if order/trade" block, but wondering if there's an easier way since that method would require a specific EA for each specific pair, I was looking for a way to set that as a parameter so it can be changed in expert advisor inputs on each chart instead. Is there a way to make it so that instead of typing every combination of EUR and USD pairs, I could just do a one all by simply saying "EUR" and "USD" ?

-
@sauce an idea is this https://fxdreema.com/shared/5usG5wKfb
but without project i don't know,how to implement it.