* macrom *
1- fin de :suite2 pour del lignes "ATS Assistant" :
let {var-f} = C:\Users\Administrateur...\Terminal\Common\Files\Chart_Symbol_Set (7).txt 							write Set (7)		-> EA 3
writefile {var-f} 1
pause 5 show
. . .
delete /NORECYCLE C:\Users\Administrateur...\Terminal\Common\Files\Chart_Symbol_Set (1).txt							del Set (1)
let {var-f} = C:\Users\Administrateur...\Terminal\Common\Files\Chart_Symbol_Set (1).txt 							write Set (1)		-> Ind 1 + EA 3+4+5+6
writefile {var-f} 1
let {var-p} = 0
goto debut
:suite2c

2- fin des clicks des colonnes ON (rouge) :
rename C:\Users\Administrateur...\Terminal\Common\Files\Chart_Symbol_Set (1).txt as
	C:\Users\Administrateur...\Terminal\Common\Files\Chart_Symbol_Set (2).txt								rename Set (1->2)	-> EA 2 + 4 + 5 + 8
pause 2 show
. . .
: label_0

3- fin de la macro :
:suite2c
if not existfile C:\Users\Administrateur...\Terminal\Common\Files\Chart_Symbol_Set (5).txt then
  if existfile C:\Users\Administrateur...\Terminal\Common\Files\Chart_Symbol_Set (4).txt then							if not (5) + Set (4)
  delete /NORECYCLE C:\Users\Administrateur...\Terminal\Common\Files\Chart_Symbol_Set (4).txt							  del Set (4)
if existfile C:\Users\Administrateur...\Terminal\Common\Files\Chart_Symbol_Set (5).txt then
  delete /NORECYCLE C:\Users\Administrateur...\Terminal\Common\Files\Chart_Symbol_Set (3).txt							if Set (5) del Set (3)
else if existfile C:\Users\Administrateur...\Terminal\Common\Files\Chart_Symbol_Set (3).txt then
  rename C:\Users\Administrateur...\Terminal\Common\Files\Chart_Symbol_Set (3).txt as								if Set (3)
	C:\Users\Administrateur...\Terminal\Common\Files\Chart_Symbol_Set (4).txt								  rename Set (3->4)	-> EA 4 + 5 + 7
let {var-p} = 0 
goto debut

* "Charts_Volatility_Check Ind0.mq4" *		EventSetTimer(2) -> t_mod = true;
1- if (t_mod && (FileIsExist("Chart_Symbol_Set (0).txt", FILE_COMMON) || FileIsExist("Chart_Symbol_Set (1).txt", FILE_COMMON)) && TimeCurrent() - tim_mod > 2) { (*1)	if Set (0 / 1)
      while(! tst2 && cpt < 50) { int nl=0;        for (int obj=0; obj < ObjectsTotal(); obj ++) { string name=ObjectName(obj);
->	boucle d'activation des colonnes D1 et M30 (1-ok, 3-ok) et enregistrement des valeurs des objets "ATS Assistant" } }

      if (GlobalVariableCheck("ATS_SetupABtn_1") && GlobalVariableGet("ATS_SetupABtn_1") == 255 &&	<- tous les boutons, 1ère ligne
      ! FileIsExist("Chart_Symbol_Set (6a-l).txt", FILE_COMMON)) { copy_file("Chart_Symbol_Set (6a-l).txt", "1"); } (*1)

2- if (FileIsExist("Chart_Symbol_Set (2).txt", FILE_COMMON) && TimeCurrent() > tim_mod && TimeCurrent() > tim_mod2) { (*2)			if Set (2)
      if (FileIsExist("Chart_Symb_Col_Set 0/1-1à12.txt", FILE_COMMON)) { FileDelete("Chart_Symb_Col_Set 0/1-1à12.txt", FILE_COMMON); }

      for (obj = 0; obj < ObjectsTotal() && ! tst; obj ++) { name = ObjectName(obj);
         if (name == "SetupABtn_1") { if (ObjectGetInteger(0, name, OBJPROP_COLOR) != clrRed) tcl1 = true;           itst ++; }
         else if (StringFind(name, "SetupABtn_") >= 0) { itst ++;          if (ObjectGetInteger(0, name, OBJPROP_COLOR) != clrRed)
               if (tcl1) copy_file("Chart_Symb_Col_Set 1-1.txt", "1");        else  copy_file("Chart_Symb_Col_Set 0-1.txt", "1");      Sleep(100); } } } (*2)

* "Charts_Volatility_Check EA.mq4" *
1- extern int tim_Charts = 20;
int OnInit() { EventSetTimer(tim_Charts * 60);
   if (FileIsExist("Chart_Symbol_Set (0).txt", FILE_COMMON)) FileDelete("Chart_Symbol_Set (0).txt", FILE_COMMON);				del Set (0)
   if (FileIsExist("Chart_Symbol_Set (5).txt", FILE_COMMON)) FileDelete("Chart_Symbol_Set (5).txt", FILE_COMMON);				del Set (5)
   GlobalVariableDel("ATS_Assistant_Max_Lines");         return(INIT_SUCCEEDED); }

2- if (! (TimeCurrent() % (tim_Charts * 60)) || (FileIsExist("Chart_Symbol_Set (5).txt", FILE_COMMON) &&
  FileGetInteger("Chart_Symbol_Set (5).txt", FILE_MODIFY_DATE, FILE_COMMON) > t_tim)) { 
   if (Symbs != "") Symbs_ = Symbs;       t_mod = true;      Symbs = ""; }

3- if ((GlobalVariableGet("ATS_Assistant_Max_Lines") <= 2 || nl <= 1 ||
  FileIsExist("Chart_Symbol_Set (7).txt", FILE_COMMON)) && prevChart && ! (TimeLocal() % 2)) { nl = 0;						if Set (7)
      for (int obj=0; obj < ObjectsTotal(prevChart, -1, OBJ_LABEL); obj ++) { string name=ObjectName(prevChart, obj, -1, OBJ_LABEL);
         if (StringFind(name, "ComboTF1_") >= 0 && (res=StrToInteger(StringSubstr(name, 9, 2))) > nl) nl = res; }
      GlobalVariableSet("ATS_Assistant_Max_Lines", nl);
      if (nl <= 2 && FileIsExist("Chart_Symbol_Set (1).txt", FILE_COMMON)) FileDelete("Chart_Symbol_Set (1).txt", FILE_COMMON); 			del Set (1)
      if (nl <= 2 && FileIsExist("Chart_Symbol_Set (1b).txt", FILE_COMMON)) FileDelete("Chart_Symbol_Set (1b).txt", FILE_COMMON);
      if (FileIsExist("Chart_Symbol_Set (7).txt", FILE_COMMON)) FileDelete("Chart_Symbol_Set (7).txt", FILE_COMMON); }					del Set (7)

4- if ((t_mod || (GlobalVariableGet("ATS_Assistant_Max_Lines") <= 2 && nl) || (! OrdersTotal() && TimeCurrent() - t_tim > 1200)) &&
  ! (DayOfWeek() == 5 && ((Hour() == 22 && Minute() > 42) || Hour() == 23)) && DayOfWeek() < 6 && (DayOfWeek() || Hour() > 22)) if (! iSymb) { (*3)

   if (GlobalVariableCheck("ATS_Assistant_Max_Lines") && GlobalVariableGet("ATS_Assistant_Max_Lines") > 7 &&
   ! FileIsExist("Chart_Symbol_Set (1).txt", FILE_COMMON)) {												if no Set (1)
//      if (FileIsExist("Chart_Symbol_Set (1).txt", FILE_COMMON)) FileDelete("Chart_Symbol_Set (1).txt", FILE_COMMON);
      if (FileIsExist("Chart_Symbol_Set (2).txt", FILE_COMMON)) FileDelete("Chart_Symbol_Set (2).txt", FILE_COMMON);					del Set (2)
      if (FileIsExist("Chart_Symbol_Set (4).txt", FILE_COMMON)) FileDelete("Chart_Symbol_Set (4).txt", FILE_COMMON);					del Set (4)
      copy_file("Chart_Symbol_Set (3).txt", IntegerToString(GlobalVariableGet("ATS_Assistant_Max_Lines")), true, false);       return; }		write Set (3)

   if (FileIsExist("Chart_Symbol_Set (2).txt", FILE_COMMON)) FileDelete("Chart_Symbol_Set (2).txt", FILE_COMMON);					del Set (2)
   if (FileIsExist("Chart_Symbol_Set (3).txt", FILE_COMMON)) FileDelete("Chart_Symbol_Set (3).txt", FILE_COMMON);					del Set (3)
   if (FileIsExist("Chart_Symbol_Set (6a-l).txt", FILE_COMMON)) FileDelete("Chart_Symbol_Set (6a-l).txt", FILE_COMMON);

   if (FileIsExist("Chart_Symbol_Set (5).txt", FILE_COMMON)) FileMove("Chart_Symbol_Set (5).txt", FILE_COMMON, "Chart_Symbol_Set (1).txt", FILE_COMMON);  if (5) move Set (5->1)
   else  copy_file("Chart_Symbol_Set (1).txt", IntegerToString(GlobalVariableGet("ATS_Assistant_Max_Lines") +1), true, false); } (*3)			write Set (1)

5- if (iSymb && ! FileIsExist("Chart_Symbol_Set (1).txt", FILE_COMMON) && ! FileIsExist("Chart_Symbol_Set (2).txt", FILE_COMMON) &&			not (1) not (2) not (3)
   ! FileIsExist("Chart_Symbol_Set (3).txt", FILE_COMMON) && t_mod2 && nl < 15 && nl2 < 15) while(iSymb && iSymb <= k) { (*4)

      if (iSymb == k) { 					v tous les boutons, 1ère ligne
         if (GlobalVariableCheck("ATS_SetupABtn_1") && GlobalVariableGet("ATS_SetupABtn_1") == 255) copy_file("Chart_Symbol_Set (6a).txt", "1", true, false);
         if (FileIsExist("Chart_Symbol_Set (4).txt", FILE_COMMON)) FileMove("Chart_Symbol_Set (4).txt", FILE_COMMON, "Chart_Symbol_Set (0).txt", FILE_COMMON);		move Set (4->0)
         if (FileIsExist("Chart_Symbol_Set (0).txt", FILE_COMMON)) FileMove("Chart_Symbol_Set (0).txt", FILE_COMMON, "Chart_Symbol_Set (1).txt", FILE_COMMON);		move Set (0->1)
         else  copy_file("Chart_Symbol_Set (1).txt", "1", true, false); 										write Set (1)
         if (nl2 > 7) copy_file("Chart_Symbol_Set (1b).txt", "1", true, false); } } (*4)

6- if (! iSymb && ! FileIsExist("Chart_Symbol_Set (0).txt", FILE_COMMON) && ! FileIsExist("Chart_Symbol_Set (1).txt", FILE_COMMON) &&			not (0) not (1)
   GlobalVariableCheck("ATS_Assistant_Check") && Symbs != "") {

	-> vérification des valeurs et stockage dans Symb2s puis SendFTP() }

7- if (! iSymb && FileIsExist("Chart_Symbol_Set (4).txt", FILE_COMMON) && GlobalVariableCheck("ATS_Assistant_Check")) { 				if Set (4)
      if (FileIsExist("Chart_Symbol_Set (6a-l).txt", FILE_COMMON)) FileDelete("Chart_Symbol_Set (6a-l).txt", FILE_COMMON);
	+ effacement des variables globales }

8- if (FileIsExist("Chart_Symbol_Set (2).txt", FILE_COMMON)) FileDelete("Chart_Symbol_Set (2).txt", FILE_COMMON); }	<- fin du EA			del Set (2)
