My terminal is set max bars in chart of 90 so that only the data I need is loaded.
When in the EA's code, int iMaxBars = TERMINAL_MAXBARS;
returns 11.
Are these not supposed to be the same? Is there a different function I should use to return the 90?
Thanks,
Maybe you should try int result=(int)ChartGetInteger(0,CHART_VISIBLE_BARS,0);
but of couse it depends on what you need. If you have less bars in history - probably the result is underestimated, if you shift the chart to allow space on the right-hand side, it may also decrease the result