It's not constant, what makes you think it is ?
This line is useless as is :
StringFormat("FridayOrWeekend %s dow=%d",TimeToString(history_data[0].time),xbar.day_of_week);
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
Hello,
i want to check day of week using TimeToStruct within OnTick, when new bar occurs.
The problem: Day of week is constant.
TimeToStruct on latest completed bar fetched with CopyRates, returns no error an also the bar date
is changing.
This problem occurs only with GBPUSD and not with US30 for instance. Historical data are bad but when the history_data[0] is correct, which is the case
and TimeToStruct is not failing, why is the xbar.day_of_week constant ?
Thank you for help