Please hlep me!!! Open trade on signal only

 

hello i want to open buy and sells only when i get the signal in chart,,,,,,,,,,,here is the code :

the problem is that the order is created on the next candle, not on the signal candle, anyone could help me please? thanks you so much

Reason: