Can I create a break in the EA following TP ??
-
Hi Everyone,
I have created an EA that opens a trade when a candle closes above a Moving Average and then closes the trade once a candle closes back below that same MA.
There are times when the trade is open and price rallies quickly and sharply to the upside and then falls back down - closing a lot lower - once the candle closes back below the MA (as intended).
If possible, I would like to TP if a trade is open and price rallies to the upside by a certain amount (e.g. 100 pips).
I tried to do this by simply setting a TP on the "Buy Now" block (as I previously had "No Stop Loss" set) but of course once the TP is executed, another trade is automatically and immediately opened as the conditions are still met for a buy signal (candle close above the MA).
Is there a way that I could:
- Program the EA to miss one buy step cycle so that it doesn't open another trade immediately following TP and only gets ready for another buy signal once price has closed below the MA (where it would've closed the trade had the TP not have triggered).
OR (if that is asking too much)
- Program the EA to turn off if/when a trade hits TP. At which point I could manually start it again once price closes below the MA - ready for another buy signal.
I am new to the platform so let me know if I haven't explained anything clearly enough and I will do my best to do so.
Thanks,
Dre
-
@dre Hi!
Just use "crosses above" instead of simply "is above" in your MA condition.
-
@roar Thanks! I appreciate your help. I will give that a go!
Dre