Hi,
Please help.
I wrote this :
This code cause no trades on Monday whole day and no trades 00:00-04:00 every day.
Please help, thanks.
put this code before OrderSend()
if(DayOfWeek()==1 && Hour()<4) return;
DayOfWeek
Returns the current zero-based day of the week (0-Sunday,1,2,3,4,5,6) of the last known server time.
int DayOfWeek();
Returned value
Current zero-based day of the week (0-Sunday,1,2,3,4,5,6).
Note
At the testing, the last known server time is modelled.
Example:
// do not work on holidays. if(DayOfWeek()==0 || DayOfWeek()==6) return(0);
put this code before OrderSend()
DayOfWeek
Returns the current zero-based day of the week (0-Sunday,1,2,3,4,5,6) of the last known server time.
Returned value
Current zero-based day of the week (0-Sunday,1,2,3,4,5,6).
Note
At the testing, the last known server time is modelled.
Example:
Thank you!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
Please help.
I wrote this :
This code cause no trades on Monday whole day and no trades 00:00-04:00 every day.
Please help, thanks.