HELP!!!! I have almost no hair left from pulling it out - lol
Any of you programers out there - help would be appreciated!!!!
I am trying to perform a routine each day at 00:00 GMT - this code works occasionally but is not picking up every single day (in a 30 day period picks up about 8 days)
if (TimeHour(Time[0])==0 && TimeMinute(Time[0])==0)
{
code goes here......
}
Any of you programers out there - help would be appreciated!!!!
I am trying to perform a routine each day at 00:00 GMT - this code works occasionally but is not picking up every single day (in a 30 day period picks up about 8 days)
if (TimeHour(Time[0])==0 && TimeMinute(Time[0])==0)
{
code goes here......
}
The problem is that Time[0] is time of a tick.
There is no guarantee that you will receive a tick at 00:00 nor that you will receive it within 1min. 2min. ........ interval. It depends on how active the market is at 00:00.
So based on your application, unless you want to use the script, you must use some window.
if (TimeHour(Time[0])==0 && TimeMinute(Time[0]) <=1) // <2 ......etc.
{
code goes here......
}
Time[0] is time of current bar beginning and not changed. Time of a tick is CurTime (in most cases)
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
Any of you programers out there - help would be appreciated!!!!
I am trying to perform a routine each day at 00:00 GMT - this code works occasionally but is not picking up every single day (in a 30 day period picks up about 8 days)
if (TimeHour(Time[0])==0 && TimeMinute(Time[0])==0)
{
code goes here......
}