kprager222:
MT5 version 5.00 build 5062 on 3 Jun 2025...
MT5 version 5.00 build 5062 on 3 Jun 2025...
Current release is 5100 and last beta is 5106.
So please try and confirm your bug report.
Alain Verleyen #:
Current release is 5100 and last beta is 5106.
So please try and confirm your bug report.
The problem occurs between when OnDeinit() is finished and when OnInit() is called again. That's where MT5 appears to mess up the content of dynamically-created objects inside the EAs.
kprager222 #:
I have tried on build 5100 6 Jun 2025 and confirm the bug is still there.
The problem occurs between when OnDeinit() is finished and when OnInit() is called again. That's where MT5 appears to mess up the content of dynamically-created objects inside the EAs.
I confirm and reported it to MQ attention.
I have tried on build 5100 6 Jun 2025 and confirm the bug is still there.
The problem occurs between when OnDeinit() is finished and when OnInit() is called again. That's where MT5 appears to mess up the content of dynamically-created objects inside the EAs.

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
Code to reproduce attached.
I have discovered that MT5 overwrites any dynamically-created object's member that contains the name of the <current chart symbol> with a <new chart symbol> when ChartSetSymbolPeriod(ChartID(), <new symbol>, _Period) is called. This can be a sign of a serious system instability in the new MT5 build.
For example:
1. I have created a random class that contains two string members: one for storing the chart symbol name, and another for storing exactly the same name but with some random string appended (in this case I use "&this" for debugging purposes).
The constructor for the object initializes both string members.
2. I then have a global pointer to this class
which I initialize in OnInit()
3. Then somewhere inside the code, a call to ChartSetSymbolPeriod() should happen to change chart symbol. I do it in OnTimer() three seconds after the launch:
It's important NOT to delete the pointer in OnDeinit(). This is supposed to happen upon global deinitialization (omitted here). The global state, of which the object is part of, must carry into the new symbol.
The content of both variables should stay the same. However, the content of m_strSymbol variable that should contain the old symbol name is somehow changed, even though the content of the m_strTestModuleID variable containing the modified old symbol name stays the same.4. Finally, at the very beginning of OnInit(), I verify the content of the carried object:
How on Earth???
Full source code is attached.