New MetaTrader 4 Platform build 1045 - page 5

 
JC:

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:

  • ChartSetSymbolPeriod() called; returns true
  • EA continues through to end of OnTimer(), executing other clean-up code
  • OnDeInit() is called successfully and correctly
  • But EA is never reloaded

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.

Service desk dialog 

It's possible to change parameters of indicator on the fly from EA
It's possible to change parameters of indicator on the fly from EA
  • www.mql5.com
0 its posiible to change the parameters of MACD indicator from this EA based on Standard Library?
 
Max Enrik:
I do not use Sleep()
Nor do I. That's not the point.
 
Ovo Cz:

Yes, there indeed was the problem before [...] 

I'm sure this is clear by now, but the new problem is in no way specific to ChartSetSymbolPeriod. The timing of a call to ChartSetSymbolPeriod just looks like one example of a much broader problem, as illustrated by my minimal example above.
 

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 have written chart management software that opens/closes/destroys charts applies templates etc.etc.

First start after the update completely failed.

Haven't found it yet but it has something to with timers and/or callbacks.
Thought i found a solution by moving the event timer out of the init into the first tick but that only works
on fast machines. On slower machines it is just a wait for mt4 to crash.

This one must be among the the worst releases ever.





Leftovers after EA remove ?

An observation.


First time you run an EA on a chart it works like it should work.

Remove the EA and reload it on the same chart again, it fails.

Remove the EA, close the chart, open a new chart and reload the EA works again.
 
JC:

I am only personally seeing a problem under the following circumstances:

  • An EA does ChartSetSymbolPeriod() on its own chart
  • There is other code, after ChartSetSymbolPeriod(), before the EA exits from OnTimer()/OnTick()

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.

 

-G- 

 
hein.ve:

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.

 
Looks like the 1045 update is gone.



Went back to the 1011 that updated to 1031 but there it stops now.
 

Hi guys!

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! :-(

Reason: