
- www.mql5.com
- Max Bars in Chart/History
- Close & Open size
- Seeing the indicator of the ea in the chart
Hi in mt4 i saw that max number of bars in history can change in Tools -> Options -> Charts with max bars in chart, but how can i change in mt5?, there is only max bars in chart, i could not find any answer for this in the forum as well, using all rates_total in each indicator in mql5 consumes too much cpu as i am using 25 custom indicator and copybuffer in my EA and 50 EA on each different chart. thanks.
In MT5 the same.
50 EAs is impressive indeed.
interesting. i am using metaquotes mt5 app for a try. here is a screenshot i can not find max number of bars in history, only max number of bars in chart exists:
in a topic in the forum max bars in history as i put in below, and max bars in chart is different in mt4. is it the same in mt5? i set it to 1000 but i could not see any difference in the cpu for example with setting 50000 or 30000 number of bars in chart.

- 2020.05.27
- Sky All
- www.mql5.com
int handlearray; double arr[]; double indicatorarray; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- //--- ArraySetAsSeries(arr, true); handlearray = iCustom(NULL,PERIOD_M5,"ind_try1"); CopyBuffer(handlearray, 0, 0, 100000, arr); indicatorarray = arr[1500]; Print(indicatorarray); return(INIT_SUCCEEDED); }
1500th element taken from the indicator could not be reached by EA ("array out of range" error happened), and yes history consists at most 1000 bar as i set the chart to 1000. but what can be the problem anything else then back history bars that affects the cpu?

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use