Comparaison des fichiers tst1.txt et TST2.TXT
***** 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, 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
ccBalance_day;
#endif
***** 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, t_rs
i515, fl_Trade=Fl_Trade;
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
ccBalance_day;      // comm=13  (6+7)   spr2=20
#endif
*****

***** tst1.txt
 
   TimeCurrent()-tim_Chart_M5 > tmfr_*60*8 && iCustom(NULL, 0, "RSI.ex4", 0, 0) > 35 && iCustom(NULL, 0, "RSI.ex4", 0, 0) < 65)
 ||
   (tst2 = (Period() == PERIOD_M15 && iCustom(NULL, 0, "RSI.ex4", 0, 0) > 40 && iCustom(NULL, 0, "RSI.ex4", 0, 0) < 60 &&
   nb_ticks > 2 && nb_ticks == nb_tcks_N + 1))) {     // ou tester la présence d'un rectangle ATS
***** TST2.TXT
 
   TimeCurrent()-tim_Chart_M5 > tmfr_*60*8 && m3_RSI (0, 2) > 35 && m3_RSI (0, 2) < 65) ||
   (tst2 = (Period() == PERIOD_M15 && m3_RSI (0, 2) > 40 && m3_RSI (0, 2) < 60 &&
   nb_ticks > 2 && nb_ticks == nb_tcks_N + 1))) {     // ou tester la présence d'un rectangle ATS
*****

***** tst1.txt
 ",((Period() > PERIOD_M15 || DayOfWeek() == 5) &&
         ! time_allow)," ",(Period() > PERIOD_M15 || DayOfWeek() == 5)," ",OS5_tick," ",Hour()," ",TimeToStr(tim_Chart_M5,TIME_
MINUTES)," ",TimeToStr(tim_M15,TIME_MINUTES) +" **"); }
#endif
***** TST2.TXT
 ",((Period() > PERIOD_M15 || DayOfWeek() == 5) &&
         ! time_allow)," ",(Period() > PERIOD_M15 || DayOfWeek() == 5)," ",t_rsi515," ",OS5_tick," ",Hour()," ",TimeToStr(tim_C
hart_M5,TIME_MINUTES)," ",TimeToStr(tim_M15,TIME_MINUTES) +" **"); }
#endif
*****

***** tst1.txt
  if (obj_bars[prv_pos] >= Bars-1 && OS5_tick && time_allow && (!ticket || (bull_==NULL && bull_!=false) || ((bull && ! bull_) 
|| (! bull && bull_)))) {
#endif
***** TST2.TXT
  if (obj_bars[prv_pos] >= Bars-1 && OS5_tick && time_allow && (!ticket || (bull_==NULL && bull_!=false) || ((bull && ! bull_) 
|| (! bull && bull_)))/* &&
   (! t_rsi515 || (Hour() >= 10 && Time[0] - OrderOpenTime() > 7200)) && ((last_ntr_pr > Ask && ! bull) || (last_ntr_pr < Bid &
& bull)) && last_ntr_pr*/) {
#endif
*****

***** tst1.txt
row_chk Error (2): ",GetLastError()," ***");   //iClose(NULL,0,0)
     #ifdef v_opfx_0 if (iCustom(NULL,0,"RSI.ex4",0,0)>40 && iCustom(NULL,0,"RSI.ex4",0,0)<60 && Period()==PERIOD_M5 && (H1<H3 
|| Hour()>H2+2)) { t1 = 0;  GlobalVariableSet("tmfr_0_bk-tst", PERIOD_M15);
         while(! (tst=ChartSetSymbolPeriod(0, NULL, PERIOD_M15)) && t1 < 17) { t1 ++;     Sleep(100);      tim_M15 = Time[0]; }
***** TST2.TXT
row_chk Error (2): ",GetLastError()," ***");   //iClose(NULL,0,0)
     #ifdef v_opfx_0 if (m3_RSI (0, 2) > 40 && m3_RSI (0, 2) < 60 && Period()==PERIOD_M5 && (H1<H3 || Hour()>H2+2)) { t1 = 0;  
  GlobalVariableSet("tmfr_0_bk-tst", PERIOD_M15);
         while(! (tst=ChartSetSymbolPeriod(0, NULL, PERIOD_M15)) && t1 < 17) { t1 ++;     Sleep(100);      tim_M15 = Time[0]; }
*****

***** tst1.txt
  else if (obj_bars[prv_pos] >= Bars-1 && so_cpt < 2) { so_cpt ++;
      Print("*** DrawArrow_OS (*)5 "+(!ticket || (bull_==NULL && bull_!=false) || ((bull && ! bull_) || (! bull && bull_)))+" "
+(bull_==NULL && bull_!=false)+" "+
         (bull && ! bull_)+" "+(! bull && bull_)+" "+IntegerToString(ticket)+" "+bull_+" "+bull+" "+OS5_tick+" "+time_allow+" *
**"); }
  else if (obj_bars[prv_pos] < Bars-1) so_cpt = 0;
***** TST2.TXT
  else if (obj_bars[prv_pos] >= Bars-1 && so_cpt < 2) { so_cpt ++;
      Print("*** DrawArrow_OS (*)5 "+(!ticket || (bull_==NULL && bull_!=false) || ((bull && ! bull_) || (! bull && bull_))) + "
 " + (bull_==NULL && bull_!=false) + " " +
         (bull && ! bull_)+" "+(! bull && bull_) + " " + IntegerToString(ticket) + " " + bull_ + " " + bull + " " + t_rsi515 + 
" " + OS5_tick + " " + time_allow + " " +
         DoubleToStr(last_ntr_pr, Digits()) + " " + DoubleToStr(bull? Bid: Ask, Digits()) + " ***"); }
  else if (obj_bars[prv_pos] < Bars-1) so_cpt = 0;
*****

***** tst1.txt
Cornsilk);    tim_flt = Time[0]; }
         if (nb_ticks > 2 && nb_ticks == nb_tcks_N + 1 && iCustom(NULL, 0, "RSI.ex4", 0, 0) > 35 && iCustom(NULL, 0, "RSI.ex4",
 0, 0) < 65 && Period() == PERIOD_M5 &&
         (H1 < H3 || Hour() > H2)) { t1 = 0;             GlobalVariableSet("tmfr_0_bk-tst", PERIOD_M15);
***** TST2.TXT
Cornsilk);    tim_flt = Time[0]; }
         if (nb_ticks > 2 && nb_ticks == nb_tcks_N + 1 && m3_RSI (0, 2) > 35 && m3_RSI (0, 2) < 65 && Period() == PERIOD_M5 &&
         (H1 < H3 || Hour() > H2)) { t1 = 0;             GlobalVariableSet("tmfr_0_bk-tst", PERIOD_M15);
*****

***** tst1.txt
flt = 0; }       // ObjectDelete(Line_N);
      if (tim_M15 > 0 && (Time[0] - tim_M15 > Period() * 60*8 || ! fl_Trade) && Period() == PERIOD_M15) { t1 = 0;    GlobalVari
***** TST2.TXT
flt = 0; }       // ObjectDelete(Line_N);
      t_rsi515 = (m3_RSI(PERIOD_M5,2) > 38 && m3_RSI(PERIOD_M5,2) < 62 && m3_RSI(PERIOD_M15,2) > 38 && m3_RSI(PERIOD_M15,2) < 6
2 && (Period()==PERIOD_M5 || Period()==PERIOD_M15));
      if (tim_M15 > 0 && (Time[0] - tim_M15 > Period() * 60*8 || ! fl_Trade) && Period() == PERIOD_M15) { t1 = 0;    GlobalVari
*****

***** tst1.txt
 } }
     if (! trd_on && mOrderSelect(mOrdersTotal(magic_nb)==1?0:2,SELECT_BY_POS)) { ticket = OrderTicket();         bull2 = ! Ord
erType(); }
     else { bull2 = bull_;          if (! trd_on) ticket = 0; }            trd_on = false; }
  if (! iBarShift(NULL,0,last_liq_t1,false) && iCustom(NULL, 0, "RSI.ex4", 0, 0) > 40 && iCustom(NULL, 0, "RSI.ex4", 0, 0) < 60
 && Period() == PERIOD_M5 &&
  (H1 < H3 || Hour() > H2 + 2)) { t1 = 0;             GlobalVariableSet("tmfr_0_bk-tst", PERIOD_M15);
      while(! (tst=ChartSetSymbolPeriod(0, NULL, PERIOD_M15)) && t1 < 17) { t1 ++;     Sleep(100);       tim_M15 = Time[0]; }
      if (tst) { temp = "** Passage en M15 (3) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period
())+", t1="+IntegerToString(t1)+") **";
         Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " + Symbol() + ": " + temp); } 
}
  bool d_HiLo=((douHiLo > (Point() != 0.00001 && Point() != 0.001? str=="-HKG" || str=="-CHN"? 0.001: 0.0005: 0.00017) * Bid) &
***** TST2.TXT
 } }
      if (! trd_on && mOrderSelect(mOrdersTotal(magic_nb)==1?0:2,SELECT_BY_POS)) { ticket = OrderTicket();         bull2 = ! Or
derType(); }
      else { bull2 = bull_;         if (! trd_on) { ticket = 0;     GlobalVariableSet(tck_vstr, 0); } }           trd_on = fals
e; }
  if (tim_M15 < Time[0] && (! iBarShift(NULL,0,last_liq_t1,false) && m3_RSI (0, 2) > 40 && m3_RSI (0, 2) < 60 && Period() == PE
RIOD_M5 &&
  (H1 < H3 || Hour() > H2 + 2))) { t1 = 0;            GlobalVariableSet("tmfr_0_bk-tst", PERIOD_M15);
      while(! (tst=ChartSetSymbolPeriod(0, NULL, PERIOD_M15)) && t1 < 17) { t1 ++;     Sleep(100); }        if (tst) { tim_M15 
= Time[0];       //t_M5_M15 = true;
         temp = "** Passage en M15 (3) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t
1="+IntegerToString(t1)+") **";
         Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp
); } }
  if ((m3_RSI (PERIOD_M5, 2) < 32 || m3_RSI (PERIOD_M5, 2) > 68) && m3_RSI (PERIOD_H1, 2) > 28 && m3_RSI (PERIOD_H1, 2) < 72 &&
 Period() == PERIOD_M15) {
      t1 = 0;           GlobalVariableSet(tmfr0_str, PERIOD_M5);        // revoir si RSI H1 nécessaire
      while(! (tst=ChartSetSymbolPeriod(0, NULL, PERIOD_M5)) && t1 < 17) { t1 ++;         Sleep(100); }        if (tst) { tim_M
15 = 0;
         temp = "** Passage en M5 (2) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1
="+IntegerToString(t1)+") **";
         Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp
); } }
  bool d_HiLo=((douHiLo > (Point() != 0.00001 && Point() != 0.001? str=="-HKG" || str=="-CHN"? 0.001: 0.0005: 0.00017) * Bid) &
*****

***** tst1.txt
r+"_Sell.txt", 0))) &&
   (iCustom(NULL, PERIOD_H1, "RSI.ex4", 0, 0) < 38 || iCustom(NULL, PERIOD_H1, "RSI.ex4", 0, 0) > 62))) && ((ticket <= 7 && ! M
QLInfoInteger(MQL_TESTER)) || ! ticket)) {
      Print("** -> DrawArrow_OS 7 ",bull_," ",bull," ",ticket," ",t_night," ",(str=="-CHN"? IntegerToString(Seconds())+" ": "")
***** TST2.TXT
r+"_Sell.txt", 0))) &&
   (m3_RSI (PERIOD_H1, 2) < 38 || m3_RSI (PERIOD_H1, 2) > 62))) && ((ticket <= 7 && ! MQLInfoInteger(MQL_TESTER)) || ! ticket))
 {
      Print("** -> DrawArrow_OS 7 ",bull_," ",bull," ",ticket," ",t_night," ",(str=="-CHN"? IntegerToString(Seconds())+" ": "")
*****

***** tst1.txt
f\\ATS-Ind5"+str+"_Buy.txt", 0)) || 
   (! bull && FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Sell.txt", 0))) && (iCustom(NULL, PERIOD_H1, "RSI.ex4", 0, 0) < 38 |
| iCustom(NULL, PERIOD_H1, "RSI.ex4", 0, 0) > 62))));
  if (DayOfWeek() < 5 && !t_h6 && t_night && Hour() == H1 && Minute() >= 40 && (str == "-CHN" || str == "-HKG"))
***** TST2.TXT
f\\ATS-Ind5"+str+"_Buy.txt", 0)) || 
   (! bull && FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Sell.txt", 0))) && (m3_RSI (PERIOD_H1, 2) < 38 || m3_RSI (PERIOD_H1,
 2) > 62))));
  if (DayOfWeek() < 5 && !t_h6 && t_night && Hour() == H1 && Minute() >= 40 && (str == "-CHN" || str == "-HKG"))
*****

***** tst1.txt
ff\\ATS-Ind5"+str+"_Buy.txt", 0)+" "+
         DoubleToStr(iCustom(NULL, PERIOD_H1, "RSI.ex4", 0, 0), 2) + " " + IntegerToString(Seconds()) + " ": ""), TimeToStr(Tim
e[0],TIME_MINUTES), " **"); //*/
  if (H1 > H3 && t_night != t_night_) Print("** Suivi de t_night et tr_allow (3) : "+Symbol()+" / "+IntegerToString(Period())+"
***** TST2.TXT
ff\\ATS-Ind5"+str+"_Buy.txt", 0)+" "+
         DoubleToStr(m3_RSI (PERIOD_H1, 2), 2) + " " + IntegerToString(Seconds()) + " ": ""), TimeToStr(Time[0],TIME_MINUTES), 
" **"); //*/
  if (H1 > H3 && t_night != t_night_) Print("** Suivi de t_night et tr_allow (3) : "+Symbol()+" / "+IntegerToString(Period())+"
*****

***** tst1.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;
***** TST2.TXT
 - t_night = "+t_night+" - tr_allow = "+tr_allow+" **");
  if ((DayOfWeek() == 5 && ((((Hour() == 16 && Minute() > 39) || Hour() > 16 || t_night) && m3_RSI (0, 2) > 38 && m3_RSI (0, 2)
 < 62) ||
   Hour() == 23)) && (ticket > 7 || (ticket && MQLInfoInteger(MQL_TESTER)))) { t_night = true;
*****

***** tst1.txt
r != "-CHN" || (tst_6 =
      (OrderProfit() / lot < 100 || iCustom(NULL, 0, "RSI.ex4", 0, 0) < 38 || iCustom(NULL, 0, "RSI.ex4", 0, 0) > 62))))))) {  
   // && (str=="-GLD" || t_night))
        #endif ticket = OrderSend(Symbol(), Bullish? ORDER_TYPE_BUY: ORDER_TYPE_SELL, lot, Bullish? Ask: Bid, slip,#ifndef v_op
***** TST2.TXT
r != "-CHN" || (tst_6 =
      (OrderProfit() / lot < 100 || m3_RSI (0, 2) < 38 || m3_RSI (0, 2) > 62))))))) {        // && (str=="-GLD" || t_night))
        #endif ticket = OrderSend(Symbol(), Bullish? ORDER_TYPE_BUY: ORDER_TYPE_SELL, lot, Bullish? Ask: Bid, slip,#ifndef v_op
*****

***** tst1.txt
int f_End_EA() { int zero=0;    return(1/zero); }
#endif
***** TST2.TXT
int f_End_EA() { int zero=0;    return(1/zero); }

double m3_RSI (ENUM_TIMEFRAMES per,int nb) {
   return((iCustom(NULL, per, "RSI.ex4", 0, 1) + iCustom(NULL, per, "RSI.ex4", 0, 2) +
      (nb == 3 ? iCustom(NULL, per, "RSI.ex4", 0, 3) : 0.0)) / nb); }
#endif
*****

