I want to put some code in the indicator about setting limit for max bars in history and max bars in chars,Preventing too much data loading on the chart make CPU slow down or terminal freeze.Even if some one set the value as 999999999999,the indicator will optimize value to limit as ex.=>500000.Would someone please give me some instruction?? Thanks very much!!
In real time data loading, my indicator recalculates while changing time frame. I want to prevent someone set too high value in tools->options that cause terminal freeze.but need to access new bars data.I need a code to control max bars in chart and history, Is there any other ways?