Correction, it also occurs when switching profiles.
New chart gets added to default profile.
![Code profiling - Developing programs - MetaEditor Help Code profiling - Developing programs - MetaEditor Help](https://c.mql5.com/36/33/code-profiling-developing-programs.png)
Code profiling - Developing programs - MetaEditor Help
- www.metatrader5.com
Profiling means collecting program parameters during its execution. During a profiling, the execution time and the number of calls of individual functions and program code lines are measured. With this tool, the programmer is able to find and optimize the slowest code sections. Profiling can be performed on the normal chart of the trading...
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
I'm not sure if this has existed for versions previous to 1260. MT4 now can make chart offspring!! This is actually serious because it will also copy charts with an open EA, with trading privileges.
Steps to reproduce...
- Start terminal with the following command:
and your startup.ini includes a chart as per the documentation...
- Open a chart (doesn't matter which one) and then close MT4 after waiting enough time for it's chr file to be written in profiles\defaults.
- Close MT4
- Reopen with the same command:
Presto! Magic chart babies.
I have tested this with multiple charts as well and it seems to happen only on termination of the application. Best I can tell, MT4 is getting confused about the chart that has been opened by the startup script and decides to write a template for it as a chartXX.chr in the profiles dir with it's last written info from memory. Then upon reopen, it just figures that chr was a regular chart opened by the user and does the default behavior. Just a guess.