Comparaison des fichiers tst1.txt et TST2.TXT
***** tst1.txt
//extern magic_nbs magic_lm = 50100601;
extern bool fl_Trade = true;
#endif
***** TST2.TXT
//extern magic_nbs magic_lm = 50100601;
extern bool Fl_Trade = true;
#endif
*****

***** tst1.txt
#ifdef v_opfx_0
string tmp3, s_name, s_coptime, str_DCC;
string tck_vstr,bull_str,tmfr0_str,tmfr1_str,tmfr2_str,l_rct_str,Chart_str,t1_Chart_str,t2_Chart_str,t1_Bull_str,t2_Bull_str,t3
***** TST2.TXT
#ifdef v_opfx_0
string tmp3, s_name, s_coptime, str_DCC, LabelNameSt2;
string tck_vstr,bull_str,tmfr0_str,tmfr1_str,tmfr2_str,l_rct_str,Chart_str,t1_Chart_str,t2_Chart_str,t1_Bull_str,t2_Bull_str,t3
*****

***** tst1.txt
datetime tim_Chart_M5, tim_Chart_M5b, tim_Alt_M5, last_rect, last_rct_=0, i_Cht_M5, curr_time, ATS_Time, tst_5c, tim_M15, tim_f
lt;
bool t5a_Bullish, t5b_Bullish, t5a_Bull_b, t5b_Bull_b, pass1b, t_night, t_h6, tst_5b, t_ngt0, ha_Shw=false, tmp_saved, t_TST1, 
***** TST2.TXT
datetime tim_Chart_M5, tim_Chart_M5b, tim_Alt_M5, last_rect, last_rct_=0, i_Cht_M5, curr_time, ATS_Time, tst_5c, tim_M15, tim_f
lt, tim_flt_=Time[0];
bool t5a_Bullish, t5b_Bullish, t5a_Bull_b, t5b_Bull_b, pass1b, t_night, t_h6, tst_5b, t_ngt0, ha_Shw=false, tmp_saved, t_TST1, 
*****

***** tst1.txt
t_TST2, Liqu_x2, t_M15_H1=false,
   OS1_tick=true, OS2_tick=true, OS3_tick=true, OS4_tick=true, OS5_tick=true, OS6_tick=true, OS9_tick=true, bull2, trd_on;     
  // comm=13  (6+7)   spr2=20
int sprd, comm, H1, H2, H3, H3_, diff, nb_ticks, nb_tcks_N, NR, rect_HG, haCoef=1, liqu_x2_n;      double SL, Rect_Hs[50][2], A
***** TST2.TXT
t_TST2, Liqu_x2, t_M15_H1=false,
   OS1_tick=true, OS2_tick=true, OS3_tick=true, OS4_tick=true, OS5_tick=true, OS6_tick=true, OS9_tick=true, bull2, trd_on, fl_T
rade=Fl_Trade;      // comm=13  (6+7)   spr2=20
int sprd, comm, H1, H2, H3, H3_, diff, nb_ticks, nb_tcks_N, NR, rect_HG, haCoef=1, liqu_x2_n;      double SL, Rect_Hs[50][2], A
*****

***** tst1.txt
   if (Hour() >= H1 && ! (Minute() % PERIOD_M5 * 60) && Seconds() < 7 && test1 < Seconds()) { test1 = Seconds();
      Print("** -> TEST(1) DrawArrow_OS n ",bull_," ",bull," ",ticket," ",t_night," ",TimeToStr(Time[0],TIME_MINUTES)," / ",(!(
((Hour()>1 || (Hour() && 
         Minute()>2)) && (Hour()<23 || Minute()<59)) || (Bid>0 && Ask>Bid && (Ask-Bid)*Point < 8)) && (Period() > PERIOD_M15 ||
***** TST2.TXT
   if (Hour() >= H1 && ! (Minute() % PERIOD_M5 * 60) && Seconds() < 7 && test1 < Seconds()) { test1 = Seconds();
      Print("** -> TEST(1) DrawArrow_OS n ",bull_," ",bull," ",ticket," ",t_night," ",TimeToStr(Time[0],TIME_MINUTES)," / ",fl_
Trade," ",(!(((Hour()>1 || (Hour() && 
         Minute()>2)) && (Hour()<23 || Minute()<59)) || (Bid>0 && Ask>Bid && (Ask-Bid)*Point < 8)) && (Period() > PERIOD_M15 ||
*****

***** tst1.txt

  int tmpHiLo, total_;     tst = false;       ObjectsDelete(0, "Chck2"#ifdef v_opfx_0, 1, 0#endif);       ObjectsDelete(0, "Sto
p"#ifdef v_opfx_0, 1, 0#endif);
  bool bullish;      total = 0;     for (i = Bars-nBars; i <= Bars; i ++) {     // <- attention Bars-300 **
      tmpHiLo = int (((iHigh(NULL,0,Bars-i+5)-iLow(NULL,0,Bars-i+5)) + (iHigh(NULL,0,Bars-i+1)-iLow(NULL,0,Bars-i+1)) + (iHigh(
***** TST2.TXT

#ifndef v_opfx_0
  int tmpHiLo, total_;     tst = false;      ObjectsDelete(0, "Chck2");       ObjectsDelete(0, "Stop");
  bool bullish;      total = 0;     for (i = Bars-nBars; i <= Bars; i ++) {      // <- attention Bars-300 **
#else
  int ind_total = ChartIndicatorsTotal(0,0);    bool t_ind300;    temp = NULL;   for (int ind = 0; ind < ind_total && (t_ind300
=(temp==NULL)); ind ++)
      if (StringFind((name=ChartIndicatorName(0,0,ind)), "ATS") > 0) temp = StringSubstr(name, StringFind(name, "(")+1, 3);
  int tmpHiLo, total_;     tst = false;      if (! t_ind300 && pass1) { ObjectsDelete(0, "Chck2", 1, 0);      ObjectsDelete(0, 
"Stop", 1, 0); }
  bool bullish;      total = 0;        tim_flt_ = tim_flt > 0 ? tim_flt : tim_flt_;
  for (i = Bars - (pass1 ? nBars : fmin(nBars, iBarShift(NULL,0, fmax(tim_flt,tim_flt_), false))); i <= Bars; i ++) {
#endif
      tmpHiLo = int (((iHigh(NULL,0,Bars-i+5)-iLow(NULL,0,Bars-i+5)) + (iHigh(NULL,0,Bars-i+1)-iLow(NULL,0,Bars-i+1)) + (iHigh(
*****

***** tst1.txt
(Bars-i)+" - "+IntegerToString(p)+" ***"); }
         if (total_) CreateLabel_st((WindowPriceMax(0)+iHigh(NULL,0,Bars-i+5))/2, Bars-i, DoubleToStr(iHigh(NULL,0,Bars-i), 0)+
" "+
            DoubleToStr(iLow(NULL, 0, Bars-i), 0)+" "+DoubleToStr((iHigh(NULL, 0, Bars-i)-iLow(NULL, 0, Bars-i))*(1.0-Profit_Ba
***** TST2.TXT
(Bars-i)+" - "+IntegerToString(p)+" ***"); }
         if (total_) CreateLabel_st((WindowPriceMax(0)+iHigh(NULL,0,Bars-i+5))/2, Bars-i-1, DoubleToStr(iHigh(NULL,0,Bars-i), 0
)+" "+
            DoubleToStr(iLow(NULL, 0, Bars-i), 0)+" "+DoubleToStr((iHigh(NULL, 0, Bars-i)-iLow(NULL, 0, Bars-i))*(1.0-Profit_Ba
*****

***** tst1.txt
               (bullish? Bid: Ask) * (bullish? -1: 1)) / Point; } }        //obj_liqTypes[obj_pos0[p]]
  ObjectDelete(LabelNameEnd2);            LabelNameEnd2 = NULL;         if (tst) { haCoef = 5;     tim_flt = Time[0]; }
***** TST2.TXT
               (bullish? Bid: Ask) * (bullish? -1: 1)) / Point; } }        //obj_liqTypes[obj_pos0[p]]
#ifndef v_opfx_0
  ObjectDelete(LabelNameEnd2);            LabelNameEnd2 = NULL;         if (tst) { haCoef = 5;     tim_flt = Time[0]; }
*****

***** tst1.txt

#ifdef v_opfx_0
  int dgts=Digits() > 3 ? Digits() : Bid > 10000 ? 2 : 3;      double douHiLo, rect_H;       bool t_ngt1;
***** TST2.TXT

#else
//Alert("*****1* "+Fl_Trade+" "+fl_Trade+" "+tst+" "+LabelNameStp+" *******");
  ObjectDelete(LabelNameEnd2);            LabelNameEnd2 = NULL;            if (tst) { haCoef = 5;
      tim_flt = Time[0];      fl_Trade = Fl_Trade;       ObjectSet(LabelNameStp, OBJPROP_ARROWCODE, fl_Trade ? 252: 253); }
  CreateLabel_end(0,0,obj_total,!bull," -> correction : "+DoubleToStr(total/(strTot?100/myLot:1),strTot?2:0)+(strTot?" $":"")+"
 (StTrd)",0,1);
  if (fl_Trade && tst && ticket && (Hour() || Minute() > 12) && (Hour() < H3 || Minute() < 44)) {  // 23
      FollowTrade(Bid > (iHigh(NULL,0,0)+iLow(NULL,0,0)) / 2); //*/
      if (cresult) { ticket = 0;       GlobalVariableSet(tck_vstr, 0);     cresult = false; } }
//if (cresult) Alert("******* Stop Suiveur Atteint (VM"+IntegerToString(Period())+") Trade Cloturé. ("+LabelNameStp+") *******"
);
//else  Alert("*****2* "+fl_Trade+" "+tst+" "+LabelNameStp+" *******");
  if (St_Trd && (! ticket || tim_flt < Time[0])) { St_Trd = false;
      Profit_Top = 0.0;       Profit_Bottom = 500000.0;        LabelNameSt2 = ""; }

  int dgts=Digits() > 3 ? Digits() : Bid > 10000 ? 2 : 3;      double douHiLo, rect_H;       bool t_ngt1;
*****

***** tst1.txt
            ((iLow(NULL, 0, 0) > 0.0 && iLow(NULL, 0, 0) < rHigh) || (iLow(NULL, 0, 1) > 0.0 && iLow(NULL, 0, 1) < rHigh)))) { 
fl_Trade = true;    haCoef = 5;
            if (OrderSelect(ticket, SELECT_BY_TICKET) && OrderModify(ticket, OrderOpenPrice(), bull_ ? Bid - (Bid - fmin(iMA(NU
***** TST2.TXT
            ((iLow(NULL, 0, 0) > 0.0 && iLow(NULL, 0, 0) < rHigh) || (iLow(NULL, 0, 1) > 0.0 && iLow(NULL, 0, 1) < rHigh)))) { 
fl_Trade = Fl_Trade;   haCoef = 5;
            if (OrderSelect(ticket, SELECT_BY_TICKET) && OrderModify(ticket, OrderOpenPrice(), bull_ ? Bid - (Bid - fmin(iMA(NU
*****

***** tst1.txt
//  if ((DayOfWeek() < 5 || H1 < H3) && t_night && Hour() == H1 && (str != "-CHN" || Seconds() > 4) && ticket <= 7) {
  int ind_total = ChartIndicatorsTotal(0,0);    temp = NULL;      for (int ind = 0; ind < ind_total && temp==NULL; ind ++)
      if (StringFind((name=ChartIndicatorName(0,0,ind)), "ATS") > 0) temp = StringSubstr(name, StringFind(name, "(")+1, 3);
  if (temp != NULL && (DayOfWeek() < 5 || H1 < H3) && t_night && Hour() == H1 && ((str!="-CHN" && str!="-HKG") || Minute() >= 4
0) && (str!="-CHN" || (Seconds() > 4 &&
   ((bull && FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)) || (! bull && FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+st
***** TST2.TXT
//  if ((DayOfWeek() < 5 || H1 < H3) && t_night && Hour() == H1 && (str != "-CHN" || Seconds() > 4) && ticket <= 7) {
  if (t_ind300 && (DayOfWeek() < 5 || H1 < H3) && t_night && Hour() == H1 && ((str!="-CHN" && str!="-HKG") || Minute() >= 40) &
& (str!="-CHN" || (Seconds() > 4 &&
   ((bull && FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)) || (! bull && FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+st
*****

***** tst1.txt
 - t_night = "+t_night+" - tr_allow = "+tr_allow+" **");
  if (((DayOfWeek() == 5 && ((((Hour() == 16 && Minute() > 39) || Hour() > 16) && iCustom(NULL, 0, "RSI.ex4", 0, 0) > 35 && iCu
stom(NULL, 0, "RSI.ex4", 0, 0) < 65) ||
   Hour() == 23)) || t_night) && (ticket > 7 || (ticket && MQLInfoInteger(MQL_TESTER)))) { t_night = true;
      Print("** -> DrawArrow_OS 8 ",bull_," ",bull," ",ticket," ",t_night," ",TimeToStr(Time[0],TIME_MINUTES)," **");
***** TST2.TXT
 - t_night = "+t_night+" - tr_allow = "+tr_allow+" **");
  if ((DayOfWeek() == 5 && ((((Hour() == 16 && Minute() > 39) || Hour() > 16 || t_night) && (iCustom(NULL, 0, "RSI.ex4", 0, 1) 
+ iCustom(NULL, 0, "RSI.ex4", 0, 2) + 
   iCustom(NULL, 0, "RSI.ex4", 0, 3)) / 3 > 38 && (iCustom(NULL, 0, "RSI.ex4", 0, 1) + iCustom(NULL, 0, "RSI.ex4", 0, 2) + iCus
tom(NULL, 0, "RSI.ex4", 0, 3)) / 3 < 62) ||
   Hour() == 23)) && (ticket > 7 || (ticket && MQLInfoInteger(MQL_TESTER)))) { t_night = true;
      Print("** -> DrawArrow_OS 8 ",bull_," ",bull," ",ticket," ",t_night," ",TimeToStr(Time[0],TIME_MINUTES)," **");
*****

***** tst1.txt
#else
   ObjectSet(ArrowName, OBJPROP_ARROWCODE, I==3? 251: I==4? fl_Trade? 252: 253: I==5? 187: 252); // I==4? 252 si FollowTrade ac
tivé
#endif
***** TST2.TXT
#else
   ObjectSet(ArrowName, OBJPROP_ARROWCODE, I==3? 251: I==4? fl_Trade? 252: 253: 252); // I==4? 252 si FollowTrade activé
#endif
*****

***** tst1.txt
void CreateLabel_st(double LinePrice,int BarNum,string vText,bool bullish,bool now) {
   string LabelName = "EA_Stop-Trade-"+IntegerToString(BarNum);
   ObjectCreate(LabelName,OBJ_LABEL,0,0,0);     int vX, vY;
   ChartTimePriceToXY(0,0,Time[BarNum],LinePrice,vX,vY);
   ObjectSet(LabelName,OBJPROP_XDISTANCE,vX+4);
   ObjectSet(LabelName,OBJPROP_YDISTANCE,vY-5);
   ObjectSet(LabelName,OBJPROP_CORNER,CORNER_LEFT_UPPER);
   ObjectSet(LabelName,OBJPROP_ANCHOR,ANCHOR_RIGHT);
   ObjectSetString(0,LabelName,OBJPROP_TEXT,vText);
***** TST2.TXT
void CreateLabel_st(double LinePrice,int BarNum,string vText,bool bullish,bool now) {
   string LabelName = "EA_Stop-Trade-"+IntegerToString(BarNum)+" "+IntegerToString(Time[BarNum]);
   ObjectCreate(LabelName,OBJ_TEXT, 0, Time[BarNum], LinePrice);
   LabelNameSt2 = LabelName;
   ObjectSet(LabelName,OBJPROP_ANCHOR,ANCHOR_LEFT);
   ObjectSetString(0,LabelName,OBJPROP_TEXT,vText);
*****

