Ask for clarification

 
If I insert a pause of one hour in my EA after a position has taken the StopLoss, does this pause also occur in the backtest or only in real?

I ask you why, I read that the Sleep function does not suspend the robot execution in the strategy tester.

Thank you all for your help.

Greetings,

Giuseppe. 
 
Giuseppe D'Alessandro:
If I insert a pause of one hour in my EA after a position has taken the StopLoss, does this pause also occur in the backtest or only in real?

I ask you why, I read that the Sleep function does not suspend the robot execution in the strategy tester.

It depends how you code the pause.

If you use Sleep(), the backtester will ignore it. You know this from the documentation.

If you base it on TimeCurrent(), then the tester will honor it, i.e.

if ( timeOfStopLoss + 3600 < TimeCurrent() )
{
        . . . 
}
 
Anthony Garot:

It depends how you code the pause.

If you use Sleep(), the backtester will ignore it. You know this from the documentation.

If you base it on TimeCurrent(), then the tester will honor it, i.e.

Ok, now it's much clearer to me.

The thing that interests me is that, regardless of the backtest, the sleep parameter works in real, even if the backtest will not honor it.

Thank you very much, you have been very kind.

Greetings,

Giuseppe.

Reason: