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
Well I tested this in OnTick() after the markets opened
Print(TimeCurrent());
Sleep(10000);
Print(TimeCurrent());
RefreshRates();
Print(TimeCurrent());
The book is wrong. The documentation is correct RefreshRates - Timeseries and Indicators Access - MQL4 Reference
TimeCurrent() is a function not a variable.
Well I tested this in OnTick() after the markets opened
Print(TimeCurrent());
Sleep(10000);
Print(TimeCurrent());
RefreshRates();
Print(TimeCurrent());
Thank you.
At final we have that every calling of TimeCurrent() or TimeLocal() will show fresh data.
So as I see code must starts like
void OnTick()
{
time_curr=TimeCurrent();
...
The book is wrong. The documentation is correct
I could have written my post to be more clear.
When I said that the documentation is incorrect, I was referring to
as my test showed that TimeCurrent() IS updated when it is called within the same handled tick
and I should also have said that my test shows that RefreshRates() has no effect on TimeCurrent()