Never previously had a problem with ChartSetSymbolPeriod(). I only see a problem in builds 1032 onwards, not in the last release v1031.
The behaviour I am seeing is as follows:
This seems related to the other reports regarding manual changes of tf/symbol, and screams "race condition" at me.
Yes, there indeed was the problem before, here is a thread where I complained two years ago.
EDIT: Or even better, my vain attempt to report it as a bug.
Yes, there indeed was the problem before [...]
My two platforms updated over the weekend to 1045 - what a disaster!!!Firstly, The platforms hang most of the time and when it releases, it is for just a few seconds before it hangs again.
Secondly, I am unable to switch between TFs when templates are running - I could, however, switch between templates on a fresh chart.
Kindly advise as to what I could do until the release of the latest Windows-10 upgrade.
Thanking you most sincerely,
I have a big problem since the update to 1045:
I have several EAs running at the same time on different charts. Now, since the update to build 1045, when I restart MT4 only one EA gets started. The other EAs that were running when MT4 was closed are not started at all on MT4 start.
Do you have the same problem with build 1045?
Is there any solution to this?
I am only personally seeing a problem under the following circumstances:
I appear to be able to fix this for my own code by making sure that ChartSetSymbolPeriod() is the last thing which the EA does before returning from OnTimer()/OnTick()
However, I'm very suspicious that there is some sort of race condition in the new build of MT4. It looks very plausible that there is a problem which, for me, only manifests itself in an EA changing its own symbol/timeframe, but on other computers is capable of applying to things like the manual changing of symbol/tf which you describe.
In short: I can definitely confirm some kind of bug, which goes away if I downgrade to v1031.
This is true for me on some levels.
One thing I've noticed with an EA that I'm working on, I have objects that needs to be removed when removing the EA or changing chart. This happens in the OnDeinit method.
With the latest build the above symptom happens where the uninit is called with reason 3, but the EA "disappears". I tried to move the ChartSetSymbolPeriod call to the end of my OnTimer event, but that also didn't fix my problem.
I suspect that the race-condition might be a valid point, as in the end what fixed my problem was to move the object-cleanup steps out of the OnDeinit method, and into the OnTimer event, just before I call ChartSetSymbolPeriod.
There's clearly a very general problem in this new build, as now widely reported in many forms by many people.
What I reported, above, as working for me isn't actually fully reliable. It depends on the load on MT4. If there are enough different EAs running, then I can't find any way of structuring my code so that the EA works 100% reliably and never gets terminated without being re-initialised.
I've a big problem with this new build 1045.
If I change the time frame, the expert advisor attached to the chart it never reloaded! :-(