Hi; anyone know how close all graphs at same time? tks
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.
Jhennifher:
Hi; anyone know how close all graphs at same time? tks
Keep pressing on CTRL-W.
Hi; anyone know how close all graphs at same time? tks
Jhennifher :
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); }
lippmaje:
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
Alain Verleyen:
Keep pressing on CTRL-W.
Keep pressing on CTRL-W.
tks
Владимир Карпутов :
Попробуйте этот код:
It really worked; TCS a lot Vladimir.
337252 # :
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
![Documentation on MQL5: Chart Operations Documentation on MQL5: Chart Operations](https://c.mql5.com/36/56/documentation-on-mql5-chart-operati__2.png)
Documentation on MQL5: Chart Operations
- www.mql5.com
Chart Operations - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register