I have a code like this: if(pos_dv==true){Sleep(300000);Experts=1;GlobalVariableSet(Quantity1, Experts);} ;my intention with this code is that the expertt should wait for 60minute before assigning 1 to expert and setting globalvariableset(Quantity1,Experts;);, but the next operation is performed without waiting for the sleeping time duration.Anything wrong or what can i do.
- How to avoid the first alert when attach to a chart
- what is the max sleep duration allowed in expert?
- If last order is a loss => Sleep() function
Are you running this is the strategy tester?
Strategy tester ignores Sleep(), along with some other functions.
CB
Yes.
CB

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