sleep () not working in back testing - is there any way that I can get the sleep () to work

 

my Ea uses some sleep () functions but they do not work in back testing, is there any way that I can get the sleep () to work in back testing ?


thanx

 
buju:

my Ea uses some sleep () functions but they do not work in back testing, is there any way that I can get the sleep () to work in back testing ?


thanx


oik, ive got an idea:


- get current time

- add seconds*n to time

- get the difference of the 2 above

- start a counter until difference = true

- continue processing ....


anyone want to start me off with some basic code ????

 
Sleep(), Alarm() and SendMail() don't work in tester. Any loops with time will crush the terminal. Just any tick compare new time with proper.
 
buju:

[...] anyone want to start me off with some basic code ????

See https://www.mql5.com/en/forum/108222 which you've also posted to. The method being proposed there by alpha430 is, in principle, fine - comparing one datetime against another, giving the number of seconds difference between them.

Reason: