Shall i Suspends execution of the current expert for the specified interval?

 

Hi!

Shall i Suspends execution of the current expert for the specified interval?

eg:

i would like to validate conditions at buystop/sellstop at 11:29, once validated EA must wait 55-59 seconds and must place order.

is this possible? shall i use Sleep(55 * 1000) function?

 
No need to use Sleep(). Just make your own timer. I always use timer so I never need to use Sleep().
 
deysmacro:
No need to use Sleep(). Just make your own timer. I always use timer so I never need to use Sleep().

How to use timer? i want to suspend the EA for approx. Seconds?
 

You make your own timer.


A very simple example:

if((TimeCurrent()-TimerVar1)<60){do this}
else if {do this}


Something like that.

Reason: