Close an open trade with a new opposite trade.
-
Hi, can anyone please tell me how to make an EA to close an open trade and open a new trade every time a new condition is met?
Example: A buy condition is met EA opens a buy trade and then a sell condition is met EA closes buy trade and opens a sell trade. -
Here
https://fxdreema.com/examples#Simple-Programs
You can find an example of what you are requesting under
Buy-Sell-Buy-Sell on opposite conditions
-
Thank you so much.
-
@josecortesllobat Hello, I want a also a similar condition : BUY-SELL-BUY-SELL in opposite. But the indicator is not based on crossing average, it's my customized indicator.
Here is the pic :

BUY : if Red line is appear, and closes it if the blue line is apper
SELL : if the Blue line is appear, and close it if the Red line is appearI had try to do as in example in this link but it's not working : https://fxdreema.com/examples#Simple-Programs
An then now I try to do like below pic (Setting the Block BUY & SELL) :

I don't know whether the logic is correct or wrong. Please help me

Thank you