Hi,
Let me first state what I understood about how 'candle close' works when SL is hit: let's say the SL is 50 and LTP touched 50 at 10:01:30. In this case, the SL leg will be exited at 10:01:59 with the LTP of 10:01:59.
If I am right about this, my suggestion would be: The check for SL should happend at candle close and the trade happens then and there. (In short, whatever happens between the minute is ignored and the system should execute checks and trades at candle close.
Just for clarification: Isn't this what is happening with the backtest? If not, please let me know whether the backtest works the same way as the 'candle close' setting works now.