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-
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register