Scripts: Close_All_Windows

 

Close_All_Windows:

This script closes all windows of selected symbol or all windows of any symbol.

Close_All_Windows

Author: Daniel Osuna de la Rosa

 
Nice script, its simple and I find it very useful on EA testing...  my (mouse) index finger thanks you very much :)
 
SearchSurf:
Nice script, its simple and I find it very useful on EA testing...  my (mouse) index finger thanks you very much :)
Thank's,I really apreciate it, it's my first scipt published but i have a lot of useful tools coded I will upload soon. Any help you need I'm here and I can code it  ;)
 
Very good and useful saving time ....
 

How to also close all positions of all characters.... can someone also redo it briefly... nothing works out

//+------------------------------------------------------------------+
//| Script programme start function|
//+------------------------------------------------------------------+
void OnStart()
  {
//--- Chart Id.
   long idchart=PositionsTotal();
//--- Check Window Symbol, close and get the next Symbols Id
   while(idchart!=-1)
     {
      if(CloseAllPosition==true)SymbolsTotal(idchart);
      else if(SymbolsTotal(idchart)==NameSymbol) SymbolsTotal(idchart);
      idchart=SymbolInfoTick(idchart);
     }
  }
  
 
Simple and great!