Please Confirm.... Bug Found in MT4 latest release 1260

 

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:

C:\metatrader\terminal.exe /portable startup.ini

and your startup.ini includes a chart as per the documentation...

  ; common settings
;  Profile=default
;  Login=
;  Password=
;  Server=
;  AutoConfiguration=true
;  DataServer=
;  EnableDDE=
;  EnableNews=

  ; Experts settings
;  ExpertsEnable=true
;  ExpertsDllImport=true
;  ExpertsExpImport=true
;  ExpertsTrades=true

  ;open chart and run expert and/or script
Symbol=EURUSD
Period=MN


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

C:\metatrader\terminal /portable startup.ini


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.

 
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
  • 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...
Reason: