@traderjud said in How to properly set up this EMA situation?:

The candlestick would look something like a hammer with the wick going through the 8ema but price closing outside of the 8ema in the direction of the trend.

i think this is where you answer to your question. First you explain how candle 0 turns into 1 and so on, but try to look at the situation after it happened. Be in the present moment and look how candles look in the near past. Instead of wondering how to detect multiple rules one after another in the time.

So it sounds to me that you want to detect when Candle High is > MA and Candle Close is > MA. I can also see that you did that in your project... but I don't understand why for MA you use candle 1 (the previous candle) and for High/Close you are using candle 0 (the current candle). I think you want to use Candle ID = 1 for both.

You also say that you want the candle to close... take a look at this example - https://fxdreema.com/demo/mt4-once-per-bar