Sleep function in backtest - page 2

 
Ai Lik Tey #:

I do not know why others would need it. But for me:

- I uses it during VISUAL MODE. When some condition happen during backtest, I would like the process to be "slowed down" or "paused" so I can check some of the params and conditions. This is probably during development/debug stage.

- Another time when I use it is also with VISUAL MODE, when I want to make a video of how the EA works, I will put the sbSleepForMS() when my EA opens/closes trades. I will then set the backtest to run fastest.
This way, when my video plays, or when I want to show people the EA "in action", it will skip all the boring parts (will zoom past with the fastest speed) and when my EA opens/closes orders, it will slow down during those times. This will create a more "visually appealing" playback.

Thank you for your codes.

There are many purposes why should one needs Sleep function to work in Tester. Your solution works great. Really appreciate that, saved my day.