I've experienced a couple of times an issue with getting PERIOD_W1 data from an EA running on the D1 timeframe and it appears to occur on Mondays.
My code is simply iOpen(Symbol(), PERIOD_W1, 0) but the logic fails, as if this code is returning 0 or -1. But querying from a script it returns the correct value. (edit: I won't be able to debug this properly until next Monday!)
A bit of poking around on the internet shows that it is because MT4 does not update the PERIOD_W1 dataset automatically.
Is there a way to trigger it to be updated?
Thanks
My code is simply iOpen(Symbol(), PERIOD_W1, 0) but the logic fails, as if this code is returning 0 or -1. But querying from a script it returns the correct value. (edit: I won't be able to debug this properly until next Monday!)
A bit of poking around on the internet shows that it is because MT4 does not update the PERIOD_W1 dataset automatically.
Is there a way to trigger it to be updated?
Thanks