Forum

Can't close position

I just started studying mql5 and i want to write a program that open a position at the opening of a bar and close it at the close(in 5M timeframe, so after 5 minutes). for the opening there are no problems, but running the backtest i notice that it stops after opening the first order; can anyone