If long trade is active and a short pending get taken, close the long trade
-
Hi Everyone
Hope somebody can help me.
I have an EA that works by setting pending orders at different levels, but there are occasions where the order gets picked up and doesn't make it to the take profit before a pending gets picked up for the opposite directions.. For example :
" Im long in the market and before it hits take profit a short pending gets taken and find myself trading before ways at the same time "
When this happens I would like the long position to be closed when the short pending is taken
Im having trouble in finding a way to do this, any help would be greatly appreciated
Kind Regards, Tim
-
for this situation is usefull on Trade section, add few blocks into this section:

when Pending order is trigered, it means new Trade is created, so filter this situation with block and after that set what must happen:

and opposite for sells
-
Thank you so much .. works nicely