Single moving average decides

 

I am trying to build a very simple EA with a single smoothed moving average of 5 periods as a main decision maker.

However, being a totaly new to the mql4 I need some help with one peace of code. How should I code sending a buy order only when the 3 consecutive 5 minutes each candles close above this 5 periods SMMA? To send sell order I will figure out from your buy example.

Reason: