Note
The symbol/period change leads to the re-initialization of the Expert Advisor, attached to a chart. Re-initialization is not performed on offline charts, they're only refreshed (the same as when clicking Refresh in the terminal).
Note 2
Scripts run once they do not re-initialize it is therefore impossible to change the chart symbol period and then add a comment (to the new chart).
Possible solution: convert to Expert advisor.

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
Hi,
I'm testing the ChartSetSymbolPeriod method in mql5 however it seems to be crashing my chart window.
Steps:
Any ideas what I'm doing wrong or what the issue is?
Script
void OnStart()
{
//---
Comment("Start");
ChartSetSymbolPeriod(0, "EURUSD", PERIOD_H1);
Comment("End");
}
System info:
MetaTrader/MetaEditor version: 5.00 build 1241 22 Dec 2015
Operating system: Windows 8.1 Enterprise
Thanks