Close above EMA200 depending previous profits
-
Hello all,
Hope you are well! I have a question. I need to parameter a condition that:
If during my LONG trade the pips profits are equal or greater than 20 pips, if one of the following candles close below EMA200, the LONG trade close.
If during my SHORT trade the pips profits are equal or greater than 20 pips, if one of the following candles close above EMA200, the SHORT trade close.See the example below

I think about the following but I don't know. I think it is hardest.

Thanks a lot for your help!
Bag
-
https://fxdreema.com/shared/NL9RpiqX
Like this perhaps.
-
Thanks for your reply but it can't work cause you said if my long position win almost 20 pips and the previous candle close below EMA 200 so close it.
But if my long position reach 21 pips and go down under EMA200 with 2 pips of profit, it will not close...Other idea please?
Thanks
Bag
-
@bagheria So do you need your trade to hit AT LEAST 20 pips in profit before searching for the closeing condition, even if that happens at a lower profit?
-
Hello,
Yes, that's right
Bag
-
@bagheria Then you can use a logic variable that moves from false to true when those 20 pips were hit. Once that happens, you can use that variable as a condition to apply the closing condition.
-
Hello,
Thank you very much. It helps me!
Bye
Bag
-
@bagheria You're welcome.