Download MetaTrader 5
To add comments, please log in or register
Do you wonder how to use widgets? Read the article!
Sherif Hasan
7223
Sherif Hasan 2014.08.09 06:42 

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?

SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.08.09 06:46  
No need to use Sleep(). Just make your own timer. I always use timer so I never need to use Sleep().
Sherif Hasan
7223
Sherif Hasan 2014.08.09 07:11  
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?
SYED NAUFAL GADDAFI
1401
SYED NAUFAL GADDAFI 2014.08.09 07:26  

You make your own timer.


A very simple example:

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


Something like that.

/
To add comments, please log in or register