Closing graphs
For MT4: Close the program and navigate to the folder profiles - default and there you delete all .chr files located in it.
For MT5 the folder is MQL5 - Profiles - Charts - Default.
Hi; anyone know how close all graphs at same time? tks
Hi; anyone know how close all graphs at same time? tks
Try this code:
//+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { long chart_id=ChartID(); //--- variables for chart ID long currChart,prevChart=ChartFirst(); int i=0,limit=100; if(prevChart!=chart_id) ChartClose(prevChart); while(i<limit)// We have certainly not more than 100 open charts { currChart=ChartNext(prevChart); // Get the new chart ID by using the previous chart ID if(currChart<0) break; // Have reached the end of the chart list prevChart=currChart; // let's save the current chart ID for the ChartNext() i++; // Do not forget to increase the counter if(currChart!=chart_id) ChartClose(currChart); } ChartClose(chart_id); }
For MT4: Close the program and navigate to the folder profiles - default and there you delete all .chr files located in it.
For MT5 the folder is MQL5 - Profiles - Charts - Default.
tks
Keep pressing on CTRL-W.
tks
Попробуйте этот код:
It really worked; TCS a lot Vladimir.
Hi, thank you for guiding, i appreciate if you help me to know how to change code for closing all charts, except the chart that expret is run on it?
Explore the Chart Operations Help topic
- www.mql5.com