costum indicator EA
-
Hi
I want to build this simple EA based on a costum indicator+MA cross but I couldn't do it , can anyone helps me please

for buy :when 2 MA cross up giving a buy signal at the close of the candle, and WA explosion indicator give a green bar at the close of the same candle, the EA open a buy order at the open of the new candle and close it when that candle close.
for sell :when 2 MA cross down giving a sell signal at the close of the candle, and WA explosion indicator give a red bar at the close of the same candle, the EA open a sell order at the open of the new candle and close it when that candle close.
I attached the wa explosion indicator.
thanks.
......
Waddah_Attar_Explosion.mq4 -
I tried to explain here the problem with the moment when candle closes: https://fxdreema.com/documentation/work ... e%20closes
In short, it's not a good idea to think about "when candle close". When the new candle opens - this is almost the same thing and it's much easier to work like this.