Mql5 - ChartSetSymbolPeriod - Crashes the chart window
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.
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