How to make an Expert Sleep for 60 minutes, but keep some of its functions working?
How to make an Expert Sleep for 60 minutes, but keep some of its functions working?
- How to prevent open reopening after take profit
- Traders Joking
- MT4 downloading problem
// if ( /* condittions met */ && sleepCondittion < 1 ) sleepCondittion = GetTickCount(); if ( sleepCondittion + 60*60*1000 > GetTickCount() ) { /* desired selected functions */ } else { sleepCondittion = 0; /* rest list of functions */ }sleepCondittion should be static int.
I meant using the Sleep() function.
Thank you
If you tell it to Sleep()
no other code in that expert will be executed until the Sleep times out.
micoyoshic
Run the EA on the H1 chart
Then
if(Volume[0]=1)
{
... do stuff here once per hour on the first tick of the bar
}
.. carry on here with the other stuff for every tick
FWIW
-BB-