Hi all,
I developing an EA and I am using multiple currencies in it and I want to show arrow object on each chart for which I need chart id. The problem I am facing is I am unable to get chart if of the chart other then first chart while back testing.
I am using following script to chartid of the specified symbol.
however the above script terminated after fetching first chart id. the while loop only executes once.
please help.
Hi all,
I developing an EA and I am using multiple currencies in it and I want to show arrow object on each chart for which I need chart id. The problem I am facing is I am unable to get chart if of the chart other then first chart while back testing.
I am using following script to chartid of the specified symbol.
however the above script terminated after fetching first chart id. the while loop only executes once.
please help.
long getChartId(string sym){ long chartId=ChartFirst(); while(chartId != -1){ Print("sym...",ChartSymbol(chartId)," ID =",chartId); if ( ChartSymbol(chartId)==sym) { return chartId; } chartId=ChartNext(chartId); } return -1; }
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all,
I developing an EA and I am using multiple currencies in it and I want to show arrow object on each chart for which I need chart id. The problem I am facing is I am unable to get chart if of the chart other then first chart while back testing.
I am using following script to chartid of the specified symbol.
however the above script terminated after fetching first chart id. the while loop only executes once.
please help.