Candle pullback to MA after MA cross
-
Hello everyone,
I am seeking some guidance to create an EA based on the EMA15 and EMA50 crossing.
After the EMA15 crosses above the EMA50, I would like the EA to execute a buy order based on the first candle closing within 'x' amount of pips relative to the EMA15.
Likewise, when the EMA15 crosses below the EMA50, I would like the EA to execute a sell order based on the first candle closing with 'x' amount of pips relative to the EMA15.Please see below a screenshot for an illustration as well as the project that I have built but not completely functional.
https://www.tradingview.com/x/1bcuYFuI/
https://fxdreema.com/shared/U0Psiiwpd
Thank you in advance.
-
if you just want to limit the number of pips to prevent the price being too far away from the MA, just use distance. See my example. It is the price not further away from the MA not more than 50 pips

-
Hey @TraderEA6 thank you very much for your help. Going to give this a try.