* int copy_file(string tmp, int item) *
item = 0 ->	20210813-o.log
s1_coporder = "0 Liste_dObjets_EA 0 0 ATS 1.01 Ultimate PERIOD_" + (tmfr==PERIOD_M1? "M1": tmfr==PERIOD_M5? "M5": tmfr==PERIOD_M15? "M15": tmfr==PERIOD_M30? 
	"M30": tmfr==PERIOD_H1? "H1": tmfr==PERIOD_H4? "H4": tmfr==PERIOD_D1? "D1": tmfr==PERIOD_W1? "W1": "MN1") + " " + Symbol() + " " + (Bullish? "BUY": "SELL") + " CLOT | " +
	IntegerToString(Typ) + " " + DoubleToStr(Bullish? Ask: Bid, 2) + " " + IntegerToString(int(Typ==1? blue_time: Time[BarNum])) + " " + IntegerToString(Code) + " " + IntegerToString(Bullish);

item = 1 ->	EA_List_Orders_M5.log / EA_List_Orders_M15.log
(s2_coporder="** -> ATS 1.01 Ultimate PERIOD_" + (tmfr==PERIOD_M1? "M1": tmfr==PERIOD_M5? "M5": tmfr==PERIOD_M15? "M15": tmfr==PERIOD_M30? "M30": 
	tmfr==PERIOD_H1? "H1": tmfr==PERIOD_H4? "H4": tmfr==PERIOD_D1? "D1": tmfr==PERIOD_W1? "W1": "MN1") + " " + Symbol() + " " + (Bullish? "BUY": "SELL"))
s2_coporder = TimeToStr(TimeCurrent(),TIME_DATE|TIME_SECONDS) + " " + s2_coporder + ", DrawArrow_OS(" + IntegerToString(Typ) + ")";

s3_coporder="Stop Suiveur Atteint (VM"+IntegerToString(Period())+") Trade Cloturé. ("+DoubleToStr(bullish? Profit_Top: 
	Profit_Bottom,1)+" "+IntegerToString(Hour())+"h "+DoubleToStr(bullish? t_Low: t_High, 1)+" "+DoubleToStr((bullish? 
	Profit_Top - t_Low: t_High - Profit_Bottom)*(1.0-Profit_Back), 2)+")"+(str!=""?"\r\n\t\t"+str:"")));
s3_coporder = TimeToStr(TimeCurrent(),TIME_DATE|TIME_SECONDS) + " " + s3_coporder + ", FollowTrade()";

item = 2 ->	Price_List.csv
(s4_coporder=TimeToStr(TimeCurrent(),TIME_DATE|TIME_SECONDS) +
	";Liste dObjets EA;" + DoubleToStr(LinePrice,1) + ";" + (Bullish? "Buy": "Sell") + ";B/A;" + DoubleToStr(Bullish? Ask: Bid, 1) + ";Typ=" + IntegerToString(Typ))

* void copy_file_(int Item, string tmp) *
item < 3 ->	EA-write-file_List-Trades(item + 1).txt
copy_file_(0, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES|TIME_SECONDS) + "." +
      IntegerToString(getCurrentMs()%1000)+" ** - RECTANGLE : "+IntegerToString(Period())+" - "+TimeToStr(ObjectGet(rect_str, OBJPROP_TIME1), 
      TIME_DATE|TIME_MINUTES)+" - "+TimeToStr(last_rect, TIME_DATE|TIME_MINUTES)+" - "+TimeToStr(Time[0], TIME_DATE|TIME_MINUTES)+" **");

temp = "** -> DrawArrow_OS ATS "+(obj_bars[prv_pos] >= Bars-1)+" "+bull+" "+Bid+" "+Ask+" "+prv_pos+" "+
      obj_bars[prv_pos]+" "+(Bars-obj_bars[prv_pos])+" "+TimeToStr(Time[Bars-obj_bars[prv_pos]],TIME_MINUTES)+" | "+pos+" "+iClose(NULL,0,Bars-i+1)+" "+vScale+
      " - Op_Liq2-4 "+Op_Liq2+"-"+Op_Liq4+" **";
temp = "** -> DrawArrow_OS *5 "+(obj_bars[prv_pos] >= Bars-1)+" "+bull+" "+Bid+" "+Ask+" "+prv_pos+" "+
      obj_bars[prv_pos]+" "+(Bars-obj_bars[prv_pos])+" "+TimeToStr(Time[Bars-obj_bars[prv_pos]],TIME_MINUTES)+" | "+pos+" "+iClose(NULL,0,Bars-i+1)+" "+vScale+
      " - Op_Liq2-4 "+Op_Liq2+"-"+Op_Liq4+" **";
copy_file_(1, TimeToStr(TimeCurrent())+":"+IntegerToString(Seconds())+"."+IntegerToString(getCurrentMs()%1000)+" "+temp);

copy_file_(2, TimeToStr(TimeCurrent())+":"+IntegerToString(Seconds())+"."+IntegerToString(getCurrentMs()%1000)+
            " ** -> OrderSend ("+Typ+") "+ticket+" "+OrderProfit()+" - "+OrderSwap()+" - "+OrderCommission()+" - "+
            DoubleToStr(OrderOpenPrice(),5)+" - "+DoubleToStr(OrderClosePrice(),5)+" **");
copy_file_(2, TimeToStr(TimeCurrent())+":"+IntegerToString(Seconds())+"."+IntegerToString(getCurrentMs()%1000)+
            " ** -> OrderSend ("+Typ+") "+ticket+" "+OrderProfit()+" - "+OrderSwap()+" - "+OrderCommission()+" - "+
            DoubleToStr(OrderOpenPrice(),5)+" - "+DoubleToStr(OrderClosePrice(),5)+" - Op_Liq2-4 "+Op_Liq2+"-"+Op_Liq4+" **");

item = 3 ->	EA-write-file_List TF + HA.txt
copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES)+" "+Symbol()+": ** Initial. OK1-3 "+IntegerToString(ChartPeriod(Chart_M5))+" - "+IntegerToString(Chart_M5)+" **");
copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES)+" "+Symbol()+": ***** PASSAGE EN M30 ! ("+str_DCC+") *****");

temp = "** Passage en "+(str=="-HKG"?"M1":"M5")+" à "+IntegerToString(fmax(H1,H3))+" H ! (Period()="+IntegerToString(Period())+", t1="+
            IntegerToString(t1) + ", t2=" + IntegerToString(t2) + (t2==17 ? ", err2=" + IntegerToString(err2) : "") + ") **";
copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp);

--------------------------------------
  if (((! Hour() && H1 < H3) || Hour() < HOp || (Hour() >= H1 && H1 > H3 && (str != "-CHN" || Seconds() > 4)) || (last_rct_==Time[0] && Period()>=PERIOD_M30)) &&
   ((Period() >= PERIOD_M15 || (str == "-HKG" && Period() >= PERIOD_M5)) && ! t_M5_M15 && ! t_M15_H1)) { tmfr_ = Period()==PERIOD_M30? Period(): PERIOD_H1;
      while(! (tst=ChartSetSymbolPeriod(0, NULL, str=="-HKG"?PERIOD_M1:PERIOD_M5)) && t1 < 17) { t1 ++;     Sleep(100); }     err = GetLastError();
      if (tst) { //while((! Chart_M5 || ! int(ChartPeriod(Chart_M5))) && t2 < 17) { t2 ++;     Chart_M5 = chart_find();   Sleep(100); }
         if (! chk_chartm5(3)) { temp = "*** ERROR Chart_M5 (3) "+IntegerToString(ChartPeriod(Chart_M5))+" - "+IntegerToString(Chart_M5)+" ***";
            Alert(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); }
         Sleep(50);      ChartSetInteger(0, CHART_SCALE, 0, 3);             tmfr = str == "-HKG"? PERIOD_M1: PERIOD_M5;
         while(! ChartSetSymbolPeriod(Chart_M5, NULL, ENUM_TIMEFRAMES(tmfr_)) && t2 < 17) { t2 ++;    Sleep(100); }
         Sleep(50);            /* ChartSetInteger(Chart_M5, CHART_SCALE, 0, 5); */         int err2 = GetLastError();
         tim_Chart_M5 = TimeCurrent();       GlobalVariableSet(t1_Chart_str, tim_Chart_M5);
         t5a_Bullish = bull_;                t5b_Bullish = FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0);
         GlobalVariableSet(t1_Bull_str, t5a_Bullish);    GlobalVariableSet(t2_Bull_str, t5b_Bullish);
         GlobalVariableSet(tmfr1_str, tmfr_);            GlobalVariableSet(tmfr0_str, tmfr); }     if (last_rct_ < Time[0] && H1 > H3) t_night = true;
      if (tst) { temp = "** Passage en "+(str=="-HKG"?"M1":"M5")+" à "+IntegerToString(fmax(H1,H3))+" H ! (Period()="+IntegerToString(Period())+", t1="+
            IntegerToString(t1) + ", t2=" + IntegerToString(t2) + (t2==17 ? ", err2=" + IntegerToString(err2) : "") + ") *(1)*";
         Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); }

      if (last_rct_ == Time[0]) { temp = "***** last_rct_ (1) -> while(! (tst=ChartSetSymbolPeriod(0, && DrawArrow_OS(6, ****(2)*";
            Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); } }

  if (str == "-HKG" && Hour() == HOp && Minute() > 30 && Period() == PERIOD_M1) { t1 = 0;       GlobalVariableSet(tmfr0_str, PERIOD_M5);
      while(! (tst=ChartSetSymbolPeriod(0, NULL, PERIOD_M5)) && t1 < 17) { t1 ++;      Sleep(100); }
      if (tst) { temp = "** Passage en M5 à "+IntegerToString(HOp)+" H ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(3)*";
         Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); } }

   if ((Hour()>=HOp && (Period()==PERIOD_M5 || Period()==PERIOD_M15) && TimeCurrent() % PERIOD_M5*60 < 7 && tim_Chart_M5 > 0 && 
   TimeCurrent()-tim_Chart_M5 > tmfr_*60*8 && m3_RSI(PERIOD_M5, 2) > 40 && m3_RSI(PERIOD_M5, 2) < 60) ||
   (tst2 = (Period() == PERIOD_M15 && m3_RSI(0, 2) > 35 && m3_RSI(0, 2) < 65 &&
   nb_ticks > 2 && nb_ticks == nb_tcks_N + 1))) {     // ou tester la présence d'un rectangle ATS
      if (! chk_chartm5(4)) { temp = "*** ERROR Chart_M5 (4) "+IntegerToString(ChartPeriod(Chart_M5))+" - "+IntegerToString(Chart_M5)+" ***";
         Alert(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); }
      if ((StringTrimLeft(ChartSymbol(Chart_M5)) != "" && ((t5b_Bullish == FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0) &&
      bull_ == t5a_Bullish) || (t5b_Bullish != FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0) && bull_ != t5b_Bullish))) || tst2) {
         while(! (tst=ChartSetSymbolPeriod(0, NULL, Hour()==HOp && !Minute()? PERIOD_H1: ENUM_TIMEFRAMES(tmfr_))) && t1 < 17) { t1 ++;    Sleep(100); }
         if (Hour() == HOp && ! Minute()) GlobalVariableSet(tmfr0_str, PERIOD_H1);
         err = GetLastError();      if (tst && tmfr_ > 0) { Sleep(50);        ChartSetInteger(0, CHART_SCALE, 0, 5);
//            while((! Chart_M5 || ! int(ChartPeriod(Chart_M5))) && t2 < 17) { t2 ++;    Chart_M5 = chart_find();   Sleep(100); }
            if (! chk_chartm5(5)) { temp = "*** ERROR Chart_M5 (5) "+IntegerToString(ChartPeriod(Chart_M5))+" - "+IntegerToString(Chart_M5)+" ***";
               Alert(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); }
            t2 = 0;     while(! ChartSetSymbolPeriod(Chart_M5, NULL, PERIOD_M5) && t2 < 17) { t2 ++;      Sleep(100); }
            Sleep(50);            ChartSetInteger(Chart_M5, CHART_SCALE, 0, 4);          t_M15_H1 = true;
            temp = "** REPASSAGE EN M30 / H1 ! ("+IntegerToString(tmfr_)+", t5a_Bullish = "+IntegerToString(t5a_Bullish)+", t5b_Bullish = "+IntegerToString(t5b_Bullish)+
               ", t = "+IntegerToString(t)+", t1 = "+IntegerToString(t1)+", t2 = "+IntegerToString(t2)+(t2==17? ", err2 = "+IntegerToString(GetLastError()): "")+") *(4)*";
            Alert(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp);

   else if (Period()==PERIOD_M1 && TimeCurrent() % PERIOD_M1*60 < 3 && tim_Chart_M5b > 0 && TimeCurrent()-tim_Chart_M5b > tmfr_b*60 * 4) {
      if (! chk_chartm5(6)) { temp = "*** ERROR Chart_M5 (6) "+IntegerToString(ChartPeriod(Chart_M5))+" - "+IntegerToString(Chart_M5)+" ***";
         Alert(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); }
      if (StringTrimLeft(ChartSymbol(Chart_M5)) != "" && ((t5b_Bull_b == FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0) &&
      bull_ == t5a_Bull_b) || (t5b_Bull_b != FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0) && bull_ != t5b_Bull_b))) {
         while(! (tst=ChartSetSymbolPeriod(0, NULL, ENUM_TIMEFRAMES(tmfr_b))) && t1 < 17) { t1 ++;       Sleep(100); }     err = GetLastError();
         if (tst && tmfr_b > 0) { Sleep(50);       ChartSetInteger(0, CHART_SCALE, 0, 4);
//            while((! Chart_M5 || ! int(ChartPeriod(Chart_M5))) && t2 < 17) { t2 ++;    Chart_M5 = chart_find();   Sleep(100); }
            if (! chk_chartm5(7)) { temp = "*** ERROR Chart_M5 (7) "+IntegerToString(ChartPeriod(Chart_M5))+" - "+IntegerToString(Chart_M5)+" ***";
               Alert(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); }
            t2 = 0;     while(! ChartSetSymbolPeriod(Chart_M5, NULL, ENUM_TIMEFRAMES(tmfr_)) && t2 < 17) { t2 ++;       Sleep(100); }
            Sleep(50);            ChartSetInteger(Chart_M5, CHART_SCALE, 0, 5);
            temp = "** REPASSAGE EN M5 ! (" + IntegerToString(tmfr_b) + ", t5a_Bull_b = "+IntegerToString(t5a_Bull_b) + ", t5b_Bull_b = "+IntegerToString(t5b_Bull_b) +
               ", t1 = "+IntegerToString(t1) + ", t2 = "+IntegerToString(t2) + (t2==17 ? ", err2 = " + IntegerToString(GetLastError()) : "") + ") *(5)*";
            Alert(temp);            copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp);

   if (tst2) { temp = "** Sortie de boucle M30 / H1 ! (" + IntegerToString(tmfr_) + ", t = " + IntegerToString(t) + ", t1 = "+IntegerToString(t1) +
         ", t2 = " + IntegerToString(t2) + (t2 == 17? ", err2 = " + IntegerToString(GetLastError()): "") + ") *(6)*";      tst2 = false;
      Alert(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); }
->   (tst2 = (Period() == PERIOD_M15 && m3_RSI(0, 2) > 35 && m3_RSI(0, 2) < 65 &&
   nb_ticks > 2 && nb_ticks == nb_tcks_N + 1))

  tst1 = ! ticket || (bull_==NULL && bull_!=false) || (bull && ! bull_) || (! bull && bull_);
  tst2 = t_rsi515o || (tim_flt < TimeCurrent() - Period()*60 * 5 && tim_flt > TimeCurrent() - Period()*60 * 7 &&
   ((last_ntr_pr > Ask && ! bull) || (last_ntr_pr < Bid && bull)) && last_liq_t1 < TimeCurrent() - Period()*60 * 5 && last_liq_t1 > TimeCurrent() - Period()*60 * 7);
  if ((obj_bars[prv_pos] >= Bars-1 || ((tmf_Diff || tst2) && tst1)) && OS5_tick && time_allow && (tst1 || (tmf_Diff && ((! OrderType() && 
   obj_liqTypes[prv_pos] == "Sell") || ((OrderType() || ticket <= 7) && obj_liqTypes[prv_pos] == "Buy")))) && 
   (! t_rsi515 || H1 > H3 || (Hour() > 9 && Time[0] - OrderOpenTime() > 7200)) && (haCoef < 5 || tim_flt < TimeCurrent() - Period()*60 * 5) && ! no_OS5 &&
   ((last_ntr_pr > Ask && ! bull) || (last_ntr_pr < Bid && bull)) && last_ntr_pr) { // du à un faux signal sur XAUUSD le 04-06-2021 à 14h45 mk-time, la Liquid_Sell a disparu après
#endif
      if (ObjectType("EA_Check-"+stmfr+"-2_0 "+IntegerToString(Time[0])) > 0) {}
//         Print("** -> DrawArrow_chk EXISTS! EA_Check2_0 "+IntegerToString(Time[0])+" **");
      else if (! DrawArrow_chk(WindowPriceMax()-310*vScale*Point,0,#ifdef v_opfx_0 t_night?5:2#else 2#endif)) Print("*** DrawArrow_chk Error (2): ",GetLastError()," ***");   //iClose(NULL,0,0)
     #ifdef v_opfx_0 if (Hour() > H2 - 2 && m3_RSI(0, 2) > 40 && m3_RSI(0, 2) < 60 && Period() == PERIOD_M5 && ! tst2 && (H1 < H3 || Hour() > H2 + 2)) { t1 = 0;        // Hour() != H1
         while(! (tst=ChartSetSymbolPeriod(0, NULL, PERIOD_M15)) && t1 < 17) { t1 ++;        Sleep(100); }
         if (tst) { t_M5_M15 = true;           GlobalVariableSet(tmfr0_str, PERIOD_M15);     tim_M15 = Time[0];         liqu_x2_n = 0;       tmf_Diff = true;
            temp = "** Passage en M15 (1) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(7)*";
            Print(temp);      copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); } }        else { OS5_tick = false;

      if (nb_ticks > 2 && nb_ticks == nb_tcks_N + 1 && m3_RSI(0, 2) > 35 && m3_RSI(0, 2) < 65 && ((t_M5_M15 = (Period() == PERIOD_M5)) ||
      Period() == PERIOD_M15) && Hour() > H2 - 2) { t1 = 0;    GlobalVariableSet(tmfr0_str, PERIOD_M5? PERIOD_M15: PERIOD_M5);      nb_ticks = 0;    nb_tcks_N = 0;  // (H1 < H3 || 
         while(! (tst=ChartSetSymbolPeriod(0, NULL, PERIOD_M5? PERIOD_M15: PERIOD_M5)) && t1 < 17) { t1 ++;       Sleep(100); }       if (tst) { tim_M15 = Time[0];    tmf_Diff = true;
            temp = "** Passage en M15 (2) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(8)*";
            Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); } }

      if (t_rsi51_ && ! t_rsi515) t_rsi515o = true;             if (t_rsi515o && t_rsi515) t_rsi515o = false;
      if (tim_M15 > 0 && (Time[0] - tim_M15 > Period() * 60*8) && Period() == PERIOD_M15 &&
         ! (m3_RSI(PERIOD_M5, 2) > 40 && m3_RSI(PERIOD_M5, 2) < 60)) { t1 = 0;      GlobalVariableSet(tmfr0_str, PERIOD_M5);    // || ! fl_Trade
         while(! (tst=ChartSetSymbolPeriod(0, NULL, PERIOD_M5)) && t1 < 17) { t1 ++;      Sleep(100); }       if (tst) { tim_M15 = 0;    t_M5_M15 = false;    tmf_Diff = true;
            temp = "** Passage en M5 (1) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(9)*";
            Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); } }

      if (! trd_on && mOrderSelect(mOrdersTotal(magic_nb)==1?0:2,SELECT_BY_POS) && OrderSymbol() == Symbol()) { ticket = OrderTicket();      bull2 = ! OrderType();
         if (OrderProfit() + OrderSwap() + OrderCommission() < -0.05 * AccBalance_day && OrderClose(ticket, lot, bull2? Bid: Ask, slip, OrderProfit() > 0? clrLimeGreen: clrMagenta)) {
           temp = "***** Trade STOP LOSS Reached. This Trade Has Been Closed. ("+DoubleToStr(OrderProfit(),Digits())+" - "+Hour()+" - "+DoubleToStr(AccBalance_day,2)+") ****(10)*";
           Alert(temp);          copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); } }

  if (tim_M15 < Time[0] && (! iBarShift(NULL,0,last_liq_t1,false) && m3_RSI(0, 2) > 40 && m3_RSI(0, 2) < 60 && Period() == PERIOD_M5 &&
   ((H1 < H3 && Hour() > H2 - 2) || Hour() > H2 + 2))) { t1 = 0;           GlobalVariableSet(tmfr0_str, PERIOD_M15);
      while(! (tst=ChartSetSymbolPeriod(0, NULL, PERIOD_M15)) && t1 < 17) { t1 ++;     Sleep(100); }       if (tst) { tim_M15 = Time[0];   t_M5_M15 = true;   tmf_Diff = true;
         temp = "** Passage en M15 (3) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(11)*";
         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_M15 = 0;       tmf_Diff = true;
         temp = "** Passage en M5 (2) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(12)*";
         Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); } }

  if ((Period() == PERIOD_M5 || Period() == PERIOD_M15) && ((iBarShift(NULL,0,last_liq_t1,false) >= 4 && d_HiLo) || 
  ((iBarShift(NULL,0,last_liq_t1,false) >= 5 && fmin(fabs(last_liq_pr-Ask), fabs(last_liq_pr-Bid)) >= douHiLo*0.8 && 
  d_HiLo) && ((last_liq_pr > Ask && ! bull2) || (last_liq_pr < Bid && bull2)) && last_liq_pr > 0)) && tim_flt < TimeCurrent() - Period()*60 * 3) {
      if (! ticket && ! t_night && OS9_tick && ((! habull && bull2 && FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Sell.txt", 0)) ||
      (habull && ! bull2 && FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)))) {
         bull_ = FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0);
         temp = "** -> DrawArrow_OS 9 " + bull_ + " " + bull + " " + bull2 + " " + habull + " " + ticket + " " + t_night + " " + TimeToStr(Time[0],TIME_MINUTES) + " " +
            FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)+" "+TimeToStr(last_liq_t1,TIME_MINUTES)+" "+TimeToStr(last_liq_t2,TIME_MINUTES)+" " +
            DoubleToStr(last_liq_pr, Digits())+" "+DoubleToStr(haOpen, Digits())+" "+DoubleToStr(haClose, Digits())+" "+DoubleToStr(douHiLo, Digits())+" " +
            DoubleToStr(0.0002*Bid, Digits()) + " *(13)*";
         Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp);

      if (ticket && ((! habull && bull2 && FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)) ||
      (habull && ! bull2 && FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Sell.txt", 0)))) {
         temp = "** -> DrawArrow_OS 10 " + bull_ + " " + bull + " " + bull2 + " " + habull + " " + ticket + " " + t_night + " " + TimeToStr(Time[0],TIME_MINUTES) + " " +
            FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)+" "+TimeToStr(last_liq_t1,TIME_MINUTES)+" "+TimeToStr(last_liq_t2,TIME_MINUTES)+" " +
            DoubleToStr(last_liq_pr, Digits())+" "+DoubleToStr(haOpen, Digits())+" "+DoubleToStr(haClose, Digits())+" "+DoubleToStr(douHiLo, Digits())+" " +
            DoubleToStr(0.0002*Bid, Digits()) + " *(14)*";
         Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp);

else if (t_TST1) { temp = "** -> DrawArrow_OS 10 TEST "+Symbol()+" "+bull_+" "+bull+" "+bull2+" "+habull+" "+ticket+" "+t_night+" "+TimeToStr(Time[0],TIME_MINUTES) + " " +
   FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)+" "+TimeToStr(last_liq_t1,TIME_MINUTES)+" "+TimeToStr(last_liq_t2,TIME_MINUTES)+" "+DoubleToStr(last_liq_pr, Digits())+" "+
   DoubleToStr(haOpen, Digits()) + " " + DoubleToStr(haClose, Digits()) + " " + DoubleToStr(douHiLo, Digits()) + " " + DoubleToStr(0.0002*Bid, Digits()) + " *(15)*";
      Alert(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp);         t_TST1 = false; } }

else if (t_TST2) { temp = "** -> DrawArrow_OS 10(b) TEST " + bull_ + " " + bull + " " + bull2 + " " + ticket + " " + t_night + " " + TimeToStr(Time[0],TIME_MINUTES) + " " +
   ((last_liq_pr > Ask && ! bull) || (last_liq_pr < Bid && bull)) + " " + (last_liq_pr > Ask && ! bull) + " " + (last_liq_pr < Bid && bull) + " " + (Time[0] % Period() * 120) +
   " " + TimeToStr(last_liq_t1,TIME_MINUTES) + " " + TimeToStr(last_liq_t2,TIME_MINUTES) + " " + DoubleToStr(last_liq_pr, Digits()) + " " + DoubleToStr(haOpen, Digits()) +
  " " + DoubleToStr(haClose, Digits()) + " " + DoubleToStr(douHiLo, Digits()) + " " + DoubleToStr(0.0002*Bid, Digits()) + " *(16)*";
      Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp);         t_TST2 = false; }

  if (OS6_tick && last_rct_==Time[0] && (Period()==PERIOD_H1 || Period()==PERIOD_M30)) { bull_ = FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0);
      temp = "***** last_rct_ (2) -> while(! (tst=ChartSetSymbolPeriod(0, && DrawArrow_OS(6, ****(17)*";           OS6_tick = false;
      Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp);

      if (Typ == 5) { bool tst=false;        int t=0, t1=0, t2=0, err1, err2=0;       while(!tst && t<17 && tmfr_n!=Period()) {
         if (Period() == PERIOD_H1 || Period() == PERIOD_M30) { tmfr_ = Period();     GlobalVariableSet(t_ATS_str, Time[0]);
            while(! (tst=ChartSetSymbolPeriod(0, NULL, (tmfr_n=PERIOD_M5))) && t1 < 17) { t1 ++;      Sleep(100); }     err1 = GetLastError();
            if (tst) { Sleep(50);     ChartSetInteger(0, CHART_SCALE, 0, 3);         tmfr = PERIOD_M5;      tmf_Diff = true;
//               while((! Chart_M5 || ! int(ChartPeriod(Chart_M5))) && t2 < 17) { t2 ++;    Chart_M5 = chart_find();   Sleep(100); }
               if (! chk_chartm5(8)) { temp = "*** ERROR Chart_M5 (1) "+IntegerToString(ChartPeriod(Chart_M5))+" - "+IntegerToString(Chart_M5)+" ***";
                  Alert(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); }

         if (tmfr_n==Period()) { temp = "** Passage SANS effet en M"+IntegerToString(tmfr_n)+" avec OrderSend "+(tst_5? "OK": "ANNULE")+" ! (Typ="+IntegerToString(Typ)+
               ", Period()=" + IntegerToString(Period()) + ", Bullish=" + (Bullish) + ") *(18)*";
            Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); }

         else if (tst) { temp = "** Passage en M"+IntegerToString(tmfr_n)+" avec OrderSend "+(tst_5? "OK": "ANNULE")+" ! (Typ="+
               IntegerToString(Typ) + ", Period()=" + IntegerToString(Period()) + ", Bullish=" + (Bullish) + ", t1="+IntegerToString(t1) + ", t2="+IntegerToString(t2) +
               (t2==17 ? ", err2=" + IntegerToString(err2) : "") + ") *(19)*";
            Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp);

   if (Period() == PERIOD_M15) { GlobalVariableSet(tmfr0_str, PERIOD_M5);
      while(! (tst=ChartSetSymbolPeriod(0, NULL, PERIOD_M5)) && t1 < 17) { t1 ++;      Sleep(100);       tim_M15 = Time[0]; }       if (tst) {
         temp = "** Passage en M5 (x2) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(20)*";
         Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp);        tmf_Diff = true; }

   if (Period() > PERIOD_M15 || Period() <= PERIOD_M5) {
    if (! chk_chartm5(10)) Alert("*** ERROR Chart_M5 (10) "+IntegerToString(ChartPeriod(Chart_M5))+" - "+IntegerToString(Chart_M5)+" ***");
    if (StringTrimLeft(ChartSymbol(Chart_M5)) != "") {   if (Period() > PERIOD_M15) tmfr_ = Period();
      if (Period() == PERIOD_M5) tmfr_b = Period();      if (Period() == PERIOD_M1) tmfr_ = PERIOD_H1;
      while(! (tst=ChartSetSymbolPeriod(0, NULL, Period()==PERIOD_M5?PERIOD_M1:Period()==PERIOD_M1?PERIOD_M15:PERIOD_M5)) && t1 < 17) { t1 ++;  Sleep(100); }
         err = GetLastError();   if (tst) { if (! chk_chartm5(3)) Alert("*** ERROR Chart_M5 (11) "+IntegerToString(ChartPeriod(Chart_M5))+" - "+
            IntegerToString(Chart_M5)+" ***");       /* Sleep(50);        ChartSetInteger(0, CHART_SCALE, 0, Period() > PERIOD_M15? 4: 3); */
            tmfr = Period()==PERIOD_M5? PERIOD_M1: PERIOD_M5;           tmf_Diff = true;
//         while(! ChartSetSymbolPeriod(Chart_M5, NULL, ENUM_TIMEFRAMES(tmfr_)) && t2 < 17) { t2 ++;    Sleep(100); }
         Sleep(50);        /* ChartSetInteger(Chart_M5, CHART_SCALE, 0, Period() == PERIOD_M5? 5: 4); */    int err2 = GetLastError();
         if (Period() == PERIOD_M5) { tim_Chart_M5b = TimeCurrent();      GlobalVariableSet(t2_Chart_str, tim_Chart_M5b);
            t5a_Bull_b = bull_;                 t5b_Bull_b = FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0);
            GlobalVariableSet(t3_Bull_str, t5a_Bull_b);     GlobalVariableSet(t4_Bull_str, t5b_Bull_b);
            GlobalVariableSet(tmfr2_str, tmfr_b);           GlobalVariableSet(tmfr0_str, tmfr); }
/*         else { tim_Chart_M5 = TimeCurrent();       GlobalVariableSet("t_Chart_M5", tim_Chart_M5);
            t5a_Bullish = bull_;                t5b_Bullish = FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0);
            GlobalVariableSet(t1_Bull_str, t5a_Bullish);    GlobalVariableSet(t2_Bull_str, t5b_Bullish);
            GlobalVariableSet(tmfr1_str, tmfr_);            GlobalVariableSet(tmfr0_str, tmfr); }*/ }
      if (tst) { temp = "** Passage en " + (Period()==PERIOD_M5? "M1": "M5") + " à " + TimeToStr(TimeCurrent(),TIME_MINUTES) + " ! (Period()=" + IntegerToString(Period()) +
            ",t1=" + IntegerToString(t1)+", t2=" + IntegerToString(t2) + (t2==17 ? ", err2=" + IntegerToString(err2) : "") + ") *(21)*";
         Print(temp);         copy_file_(3, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + temp); }

------- DrawArrow_OS sans les copy_file_(3 => "EA-write-file_List TF + HA.txt" ---

      if ((t_clo_ || t_clo) && i == Bars-j-1 && ticket && blue_time2 == Time[Bars-j-i]#ifdef v_opfx_0 && OS1_tick && time_allow) { OS1_tick = false;#else) {#endif   //t_clo_ = false;      t_clo = false;
         if (blue_time3 != Time[0]) { DrawArrow_pf(bull? Bid: Ask, j, 2, !bull, 1);        DrawArrow_pf(bull? Bid: Ask, j, 6, !bull, 1);      total2_ = total2;
            Print("** -> op_case0 (2): "+IntegerToString(blue_time)+" - "+IntegerToString(blue_time2)+" - "+IntegerToString(ADX_time)+" - "+St_Trd+" - "+St_Trd2+" - "+t_clo_+" - "+t_clo+" **");
//            total2 += (prv_pos ? (obj_liqTypes[prv_pos] == "Buy" ? -1 : (obj_liqTypes[prv_pos] == "Sell" ? 1 : 0)) * (obj_Prices[pos] - obj_prClots[pos]) / Point -
//               (obj_liqTypes[prv_pos] == "Buy" || obj_liqTypes[prv_pos] == "Sell" ? 1 : 0) * comm : 0);
            total2 += total3 - total3_;            blue_time3 = Time[0]; }                            // total2 à revoir dans cette partie  ***
         if (op_case01 || op_case0) {
            Print("** -> DrawArrow_OS 1* ",bull_," ",bull," ",t_clo_," ",t_clo," ",ticket," ",Bid," ",Ask," ",i," ",j," ",Bars," ",(Bars-j-i)," ",TimeToStr(Time[Bars-j-i],TIME_MINUTES)," ",
               TimeToStr(Time[j],TIME_MINUTES)," | ",pos," ",obj_prClots[pos]," ",vScale," | ",(tmp=AccountBalance())," *(22)*");      //t_clo_ = false;      t_clo = false;    t_blue = true;

         if (((op_Liq_ && obj_bars[obj_pos0[p-1]] > Bars-2 && ((bull && Bid > op_Liq_pr) || (! bull && Ask < op_Liq_pr) || op_Liq_sp < 100 * Point)) ||
         (lastliq && obj_bars[obj_pos0[p-1]] == Bars-2)) && OS6_tick && time_allow) { OS6_tick = false;        lastliq = false;        lastliq_ = false;
            DrawArrow_OS(6, obj_prClots[pos]+(bull? 150*vScale*Point: 625*vScale*Point), Bars-i, 0, bull, 0);           PlaySound("1673.wav");
            Print("** -> DrawArrow_OS 6 ",bull_," ",bull," ",t_clo_," ",t_clo," ",ticket," ",Bid," ",Ask," ",i," ",j," ",Bars," ",(Bars-j-i)," ",TimeToStr(Time[Bars-j-i],TIME_MINUTES),
               " ",TimeToStr(Time[j],TIME_MINUTES)," | ",pos," ",obj_prClots[pos]," ",vScale," | ",(tmp=AccountBalance())," *(23)*");

      if (obj_bar_cl >= Bars-obj_bars[obj_pos[p-1]]) { ntot = 2;
         total += (obj_liqTypes[prv_pos] == "Buy" ? -1 : (obj_liqTypes[prv_pos] == "Sell" ? 1 : 0)) * (obj_Prices[pos] - obj_prClots[pos]) / Point - comm;
         if (pass1) Print("** --> (1b) total = ",total,", total2 = ",total2,", total2_ = ",total2_,", total3 = ",total3,", total3_ = ",total3_,", ticket = ",ticket," **");
         if ((Hour() != H1 || ((H1 < H3 || Minute() >= 2) && H1 < H2)) && obj_bars[obj_pos[p-1]] >= Bars-1 && (! ticket || FileIsExist("ATS-Int_On.txt", FILE_COMMON)) &&
            OS2_tick && time_allow) { OS2_tick = false;           total2_ = total2;
            DrawArrow_pf(bull? Ask: Bid, Bars-obj_bars[obj_pos[p-1]], 2, bull, 0);     DrawArrow_pf(bull? Ask: Bid, Bars-obj_bars[obj_pos[p-1]], 6, bull, 0);
            total2 += (obj_liqTypes[prv_pos] == "Buy" ? -1 : (obj_liqTypes[prv_pos] == "Sell" ? 1 : 0)) * (obj_Prices[pos] - obj_prClots[pos]) / Point - comm;
            Print("** -> DrawArrow_OS 2 ",bull_," ",bull," ",ticket," ",Bid," ",Ask," ",p," ",obj_pos[p-1]," ",obj_bars[obj_pos[p-1]]," | ",pos," ",obj_Prices[pos]," ",vScale," *(24)*");

      t_opn=false;      while (i <= (obj_pos0[p]?obj_bars[obj_pos0[p]]:Bars)) { reOpn_prs[k] = 0.0;   reClo_prs[k] = 0.0;
       t_clo=false;     for (i=i; i <= (obj_pos0[p]?obj_bars[obj_pos0[p]]:Bars) && ! t_clo; i ++) { reOpn_prs[k] = iClose(NULL,0,Bars-i);   reOpn_brs[k] = i;
         t_clo =#ifdef mkt_stocks (Period() != PERIOD_M1 || magic_nb != 50100600) && 
                #endif f_mqh_code(4, pos, prv_pos, i, obj_liqTypes[prv_pos], 0, reOpn_prs[k], 0); }      // boucle des reOps Label_Arrow_Test(Type= 1,      // * MQH *
       if (t_clo) { //if (t_clo2 < 13) { t_clo2 ++;   Label_Arrow_Test(1,prv_pos,p,i,k,reOpn_prs[k],!bull,pX,pY,total,obj_pos0,obj_pos);   pY += 34; }
         if (ea_show) { DrawArrowInt_pf(iClose(NULL,0,Bars-i+1), Bars-i+1, 3, true);         DrawArrowInt_pf(iClose(NULL,0,Bars-i+1), Bars-i+1, 5, true); }
         orge_time = Time[Bars-i+j];                      if (i == Bars-j+1) { //t_orge = false;
            if (t_orge) Print("** -> DrawArrow_OS *3 ",bull_," ",bull," ",t_clo," ",ticket," ",Bid," ",Ask," ",i," ",j," ",Bars," ",(Bars-j-i+1)," ",TimeToStr(Time[Bars-j-i+1],
               TIME_MINUTES)," ",TimeToStr(Time[j],TIME_MINUTES)," | ",pos," ",obj_prClots[pos]," ",vScale," **");   t_orge = false;   orge_time2 = Time[j]; }
         if (i == Bars-j && ! ticket && orge_time2 == Time[Bars-j-i+1]#ifdef v_opfx_0 && OS3_tick && time_allow) { OS3_tick = false;#else) {#endif
            DrawArrowInt_pf(bull? Ask: Bid, j, 2, true);           DrawArrowInt_pf(bull? Ask: Bid, j, 6, true);
            Print("** -> DrawArrow_OS 3* ",bull_," ",bull," ",t_clo," ",ticket," ",Bid," ",Ask," ",i," ",j," ",Bars," ",(Bars-j-i+1)," ",TimeToStr(Time[Bars-j-i+1],
               TIME_MINUTES)," ",TimeToStr(Time[j],TIME_MINUTES)," | ",pos," ",obj_prClots[pos]," ",vScale," *(25)*");      t_clo = false;    t_orge = true;

         if (op_case01 && t_clo && i == Bars-j && ticket && vilt_time2 == Time[Bars-j-i+1]#ifdef v_opfx_0 && OS4_tick && time_allow) { OS4_tick = false;#else) {#endif
            if (vilt_time3 != Time[0]) { DrawArrowInt_pf(bull? Bid: Ask, j, 2, false);        DrawArrowInt_pf(bull? Bid: Ask, j, 6, false);      total2_ = total2;
               total2 += (obj_liqTypes[prv_pos] == "Buy" ? -1 : (obj_liqTypes[prv_pos] == "Sell" ? 1 : 0)) * (reOpn_prs[k] - reClo_prs[k]) / Point - 
                  (obj_liqTypes[prv_pos] == "Buy" || obj_liqTypes[prv_pos] == "Sell" ? 1 : 0) * comm;          vilt_time3 = Time[0]; }
            Print("** -> DrawArrow_OS 4* ",bull_," ",bull," ",t_clo," ",ticket," ",Bid," ",Ask," ",i," ",j," ",Bars," ",(Bars-j-i+1)," ",TimeToStr(Time[Bars-j-i+1],
               TIME_MINUTES)," ",TimeToStr(Time[j],TIME_MINUTES)," | ",pos," ",obj_prClots[pos]," ",vScale," | ",(tmp=AccountBalance())," *(26)*");   t_clo = false;   t_vilt = true;

  tst1 = ! ticket || (bull_==NULL && bull_!=false) || (bull && ! bull_) || (! bull && bull_);
  tst2 = t_rsi515o || (tim_flt < TimeCurrent() - Period()*60 * 5 && tim_flt > TimeCurrent() - Period()*60 * 7 &&
   ((last_ntr_pr > Ask && ! bull) || (last_ntr_pr < Bid && bull)) && last_liq_t1 < TimeCurrent() - Period()*60 * 5 && last_liq_t1 > TimeCurrent() - Period()*60 * 7);
  if ((obj_bars[prv_pos] >= Bars-1 || ((tmf_Diff || tst2) && tst1)) && OS5_tick && time_allow && (tst1 || (tmf_Diff && ((! OrderType() && 
   obj_liqTypes[prv_pos] == "Sell") || ((OrderType() || ticket <= 7) && obj_liqTypes[prv_pos] == "Buy")))) && 
   (! t_rsi515 || H1 > H3 || (Hour() > 9 && Time[0] - OrderOpenTime() > 7200)) && (haCoef < 5 || tim_flt < TimeCurrent() - Period()*60 * 5) && ! no_OS5 &&
   ((last_ntr_pr > Ask && ! bull) || (last_ntr_pr < Bid && bull)) && last_ntr_pr) { // du à un faux signal sur XAUUSD le 04-06-2021 à 14h45 mk-time, la Liquid_Sell a disparu après
. . .																	     else { OS5_tick = false;
     #endif if (Bars != obj_bars[obj_pos[p-1]]) tmp = obj_Prices[prv_pos];    else tmp = (iOpen(NULL,0,Bars-obj_bars[obj_pos[p-2]]) * (rate1c? 5.0: rate2c? 4.0: 
         rate3c? 3.0: rate4c? 2.0: 1.0) + iClose(NULL,0,Bars-obj_bars[obj_pos[p-2]]) * (rate1c? 1.0: rate2c? 2.0: rate3c? 3.0: rate4c? 4.0: 5.0)) / 6.0;
      total2_ = total2;   /* total2 += (prv_pos? (obj_liqTypes[prv_pos]=="Sell"? 1: obj_liqTypes[prv_pos]=="Buy"? -1: 0): 0) * (tmp - (bull? Bid: Ask))/Point
         - (obj_liqTypes[prv_pos] == "Buy" || obj_liqTypes[prv_pos] == "Sell" ? 1 : 0) * comm;  */    // total2 à revoir dans cette partie    ***
      Print("** -> DrawArrow_OS 5 ",(obj_bars[prv_pos] >= Bars-1 && (!ticket || bull_==NULL || (bull && ! bull_) || (! bull && bull_)))," ",
         (obj_bars[prv_pos] >= Bars-1)," ",(!ticket || bull_==NULL || (bull && ! bull_) || (! bull && bull_)), " ", bull_, " ", bull, " ",
         ticket, " ", Bid, " ", Ask, " ", prv_pos, " ", obj_bars[prv_pos], " ", (Bars-obj_bars[prv_pos]), " ", TimeToStr(Time[Bars-obj_bars[prv_pos]],
         TIME_MINUTES)," | ",pos," ",iClose(NULL,0,Bars-i+1)," ",vScale," | ",(tmp2=AccountBalance())+ " | " +
/*   ((obj_bars[prv_pos] >= Bars-1 || tmf_Diff) && OS5_tick && time_allow && (!ticket || (bull_==NULL && bull_!=false) || ((bull && ! bull_) || (! bull && bull_)) ||
   (tmf_Diff && ((! OrderType() && obj_liqTypes[prv_pos] == "Sell") || ((OrderType() || (ticket <= 7 && ! MQLInfoInteger(MQL_TESTER)) ||
   ! ticket) && obj_liqTypes[prv_pos] == "Buy")))) && (! t_rsi515 || H1 > H3 || (Hour() > 9 && Time[0] - OrderOpenTime() > 7200)) && haCoef < 5 &&
   tim_flt < TimeCurrent() - Period()*60 * 2 && ((last_ntr_pr > Ask && ! bull) || (last_ntr_pr < Bid && bull)) && last_ntr_pr) + " | " + */
   ((obj_bars[prv_pos] >= Bars-1 || ((tmf_Diff || tst2) && tst1)) && time_allow && (tst1 || (tmf_Diff && ((! OrderType() &&     // && OS5_tick
   obj_liqTypes[prv_pos] == "Sell") || ((OrderType() || ticket <= 7) && obj_liqTypes[prv_pos] == "Buy")))) && 
   (! t_rsi515 || H1 > H3 || (Hour() > 9 && Time[0] - OrderOpenTime() > 7200)) && (haCoef < 5 || tim_flt < TimeCurrent() - Period()*60 * 5) && 
   ((last_ntr_pr > Ask && ! bull) || (last_ntr_pr < Bid && bull)) && last_ntr_pr) + " | " + tst1 + " | " + tst2 + " | " + no_OS5 + " | " +
   (obj_bars[prv_pos] >= Bars-1 || ((tmf_Diff || tst2) && tst1)) + " | " + OS5_tick + " | " + time_allow + " | " + (tst1 || (tmf_Diff && ((! OrderType() &&
   obj_liqTypes[prv_pos] == "Sell") || ((OrderType() || ticket <= 7) && obj_liqTypes[prv_pos] == "Buy")))) + " | " +
   (! t_rsi515 || H1 > H3 || (Hour() > 9 && Time[0] - OrderOpenTime() > 7200)) + " | " + (haCoef < 5 || tim_flt < TimeCurrent() - Period()*60 * 5) + " | " +
   ((last_ntr_pr > Ask && ! bull) || (last_ntr_pr < Bid && bull)) + " | " + last_ntr_pr," *(27)*"); //*/

         if (((bull_ && Ask > 0.0 && Ask < rLow - rect_H / 4 && (iHigh(NULL, 0, 0) > rLow || iHigh(NULL, 0, K) > rLow)) || (! bull_ && Bid > rHigh + rect_H / 4 &&
         ((iLow(NULL, 0, 0) > 0.0 && iLow(NULL, 0, 0) < rHigh) || (iLow(NULL, 0, K) > 0.0 && iLow(NULL, 0, K) < rHigh)))) && K < 3) { 
            Print("** -> DrawArrow_OS 12 ", bull_, " ", bull, " ", t_night, " ", ticket, " ", TimeToStr(Time[0],TIME_MINUTES)," *(28)*");

  if (ATS_Time > 0 && (TimeCurrent() - ATS_Time) > PERIOD_H1*60 * 5 && (TimeCurrent() - ATS_Time) < PERIOD_H1*60 * 6 &&
   str == "-CHN" && (Period()==PERIOD_M5 || Period()==PERIOD_M15) && int (StringSubstr(TimeToStr(ATS_Time, TIME_MINUTES), 0, 2)) > H2 &&      // H1 > H3
   int (StringSubstr(TimeToStr(ATS_Time, TIME_DATE), 8, 2)) == Day() && ticket > 7) { t_night = true;  if (str=="-CHN") t_ngt0 = true;
      Print("** -> DrawArrow_OS 11 ", bull_, " ", bull, " ", t_night, " ", ticket, " ", TimeToStr(Time[0],TIME_MINUTES)," *(29)*");

  if ((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"+str+"_Sell.txt", 0))) &&
   (m3_RSI(PERIOD_H1, 2) < 38 || m3_RSI(PERIOD_H1, 2) > 62))) && ticket <= 7) { if (str == "-CHN") fl_Trade = Fl_Trade;    // && t_ind300
      Print("** -> DrawArrow_OS 7 ",bull_," ",bull," ",t_night," ",ticket," ",(str=="-CHN"? IntegerToString(Seconds())+" ": ""),TimeToStr(Time[0],TIME_MINUTES)," *(30)*");

  if (((DayOfWeek() == 5 && (((Hour() == 16 && Minute() > 39) || Hour() > 16 || t_night) && m3_RSI(0,3) > 38 && m3_RSI(0,3) < 62)) || (Hour()==23 && Minute() > 30)) && ticket > 7) {
//  if (((DayOfWeek() == 5 && ((Hour() == 16 && Minute() > 39) || Hour() > 16)) || (t_night && (H1 < H3 || Hour() != H1))) && ticket > 7) { t_night = true;
      Print("** -> DrawArrow_OS 8 ", bull_, " ", bull, " ",t_night, " ", ticket, " ", TimeToStr(Time[0],TIME_MINUTES)," *(31)*");

-------------------------- analyse v -

Hour() | H1 | H3 | HOp | str | Seconds() | last_rct_ | Time[0] | Period() | t_M5_M15 | t_M15_H1 | tmfr_ | tmfr 
t1 | err | t2 | err2 | Chart_M5 | chk_chartm5(3) | tim_Chart_M5 | bull_ | t5a_Bullish | t5b_Bullish | FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0) | t_night 

            IntegerToString(t1) + ", t2=" + IntegerToString(t2) + (t2==17 ? ", err2=" + IntegerToString(err2) : "") + ") *(1)*";

      if (last_rct_ == Time[0]) { temp = "***** last_rct_ (1) -> while(! (tst=ChartSetSymbolPeriod(0, && DrawArrow_OS(6, ****(2)*";


str | Hour() | HOp | Minute() | Period() | t1 

      if (tst) { temp = "** Passage en M5 à "+IntegerToString(HOp)+" H ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(3)*";


Hour() | HOp | Period() | TimeCurrent() | tim_Chart_M5 | tmfr_ | m3_RSI(PERIOD_M5, 2) | tst2 | nb_ticks | nb_tcks_N 
chk_chartm5(4) | Chart_M5 | StringTrimLeft(ChartSymbol(Chart_M5)) | bull_ | t5a_Bullish) | t5b_Bullish | FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0) 
t1 | err | tmfr_ | t2 | chk_chartm5(5) | t_M15_H1 

            temp = "** REPASSAGE EN M30 / H1 ! ("+IntegerToString(tmfr_)+", t5a_Bullish = "+IntegerToString(t5a_Bullish)+", t5b_Bullish = "+IntegerToString(t5b_Bullish)+
               ", t = "+IntegerToString(t)+", t1 = "+IntegerToString(t1)+", t2 = "+IntegerToString(t2)+(t2==17? ", err2 = "+IntegerToString(GetLastError()): "")+") *(4)*";


Period() | TimeCurrent() | tim_Chart_M5b | tmfr_b | chk_chartm5(6) | Chart_M5 | StringTrimLeft(ChartSymbol(Chart_M5)) 
str | bull_ | t5a_Bull_b | t5b_Bull_b | FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0) | t1 | t2 | chk_chartm5(7) 

            temp = "** REPASSAGE EN M5 ! (" + IntegerToString(tmfr_b) + ", t5a_Bull_b = "+IntegerToString(t5a_Bull_b) + ", t5b_Bull_b = "+IntegerToString(t5b_Bull_b) +
               ", t1 = "+IntegerToString(t1) + ", t2 = "+IntegerToString(t2) + (t2==17 ? ", err2 = " + IntegerToString(GetLastError()) : "") + ") *(5)*";

tst2 | Period() | m3_RSI(0, 2) | nb_ticks | nb_tcks_N 

   if (tst2) { temp = "** Sortie de boucle M30 / H1 ! (" + IntegerToString(tmfr_) + ", t = " + IntegerToString(t) + ", t1 = "+IntegerToString(t1) +
         ", t2 = " + IntegerToString(t2) + (t2 == 17? ", err2 = " + IntegerToString(GetLastError()): "") + ") *(6)*";      tst2 = false;


tst1 | ticket | bull_ | bull | tst2 | t_rsi515o | tim_flt | TimeCurrent() | Period() | last_ntr_pr | Ask | Bid | last_liq_t1 
obj_bars[prv_pos] | Bars | tmf_Diff | OS5_tick | time_allow | OrderType() | obj_liqTypes[prv_pos] | ticket | t_rsi515 | H1 | H3 | Hour() 
Time[0] | OrderOpenTime() | haCoef | tim_flt | no_OS5 | Ask | Bid | H2 | m3_RSI(0, 2) | t1 | t_M5_M15 | tim_M15 | liqu_x2_n 

            temp = "** Passage en M15 (1) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(7)*";


nb_ticks | nb_tcks_N | m3_RSI(0, 2) | t_M5_M15 | Period() | Hour() | t1 | tim_M15 | Time[0] | tmf_Diff 

            temp = "** Passage en M15 (2) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(8)*";


t_rsi51_ | t_rsi515 | t_rsi515o | tim_M15 | Time[0] | Period() | m3_RSI(PERIOD_M5, 2) | t1 | t_M5_M15 | tmf_Diff 

            temp = "** Passage en M5 (1) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(9)*";


trd_on | OrderSymbol() | ticket | bull2 | OrderType() | OrderProfit() | OrderSwap() | OrderCommission() | AccBalance_day | lot | Bid | Ask | slip | OrderProfit() 

           temp = "***** Trade STOP LOSS Reached. This Trade Has Been Closed. ("+DoubleToStr(OrderProfit(),Digits())+" - "+Hour()+" - "+DoubleToStr(AccBalance_day,2)+") ****(10)*";


tim_M15 | Time[0] | last_liq_t1 | iBarShift(NULL,0,last_liq_t1,false) | m3_RSI(0, 2) | Period() | H1 | H3 | Hour() | H2 | t1 | t_M5_M15 | tmf_Diff 

         temp = "** Passage en M15 (3) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(11)*";


m3_RSI(PERIOD_M5, 2) | m3_RSI(PERIOD_H1, 2) | Period() | t1 | tim_M15 | tmf_Diff 

         temp = "** Passage en M5 (2) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(12)*";


Period() | last_liq_t1 | iBarShift(NULL,0,last_liq_t1,false) | d_HiLo | last_liq_pr | Ask | Bid | douHiLo | bull2 | tim_flt | TimeCurrent() | Period() 
ticket | t_night | OS9_tick | habull | FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Sell.txt", 0) | FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0) | bull_ 

         temp = "** -> DrawArrow_OS 9 " + bull_ + " " + bull + " " + bull2 + " " + habull + " " + ticket + " " + t_night + " " + TimeToStr(Time[0],TIME_MINUTES) + " " +
            FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)+" "+TimeToStr(last_liq_t1,TIME_MINUTES)+" "+TimeToStr(last_liq_t2,TIME_MINUTES)+" " +
            DoubleToStr(last_liq_pr, Digits())+" "+DoubleToStr(haOpen, Digits())+" "+DoubleToStr(haClose, Digits())+" "+DoubleToStr(douHiLo, Digits())+" " +
            DoubleToStr(0.0002*Bid, Digits()) + " *(13)*";


ticket | habull | bull2 | FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0) | FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Sell.txt", 0) 

         temp = "** -> DrawArrow_OS 10 " + bull_ + " " + bull + " " + bull2 + " " + habull + " " + ticket + " " + t_night + " " + TimeToStr(Time[0],TIME_MINUTES) + " " +
            FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)+" "+TimeToStr(last_liq_t1,TIME_MINUTES)+" "+TimeToStr(last_liq_t2,TIME_MINUTES)+" " +
            DoubleToStr(last_liq_pr, Digits())+" "+DoubleToStr(haOpen, Digits())+" "+DoubleToStr(haClose, Digits())+" "+DoubleToStr(douHiLo, Digits())+" " +
            DoubleToStr(0.0002*Bid, Digits()) + " *(14)*";


if (t_TST1) { temp = "** -> DrawArrow_OS 10 TEST "+Symbol()+" "+bull_+" "+bull+" "+bull2+" "+habull+" "+ticket+" "+t_night+" "+TimeToStr(Time[0],TIME_MINUTES) + " " +
   FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)+" "+TimeToStr(last_liq_t1,TIME_MINUTES)+" "+TimeToStr(last_liq_t2,TIME_MINUTES)+" "+DoubleToStr(last_liq_pr, Digits())+" "+
   DoubleToStr(haOpen, Digits()) + " " + DoubleToStr(haClose, Digits()) + " " + DoubleToStr(douHiLo, Digits()) + " " + DoubleToStr(0.0002*Bid, Digits()) + " *(15)*";


if (t_TST2) { temp = "** -> DrawArrow_OS 10(b) TEST " + bull_ + " " + bull + " " + bull2 + " " + ticket + " " + t_night + " " + TimeToStr(Time[0],TIME_MINUTES) + " " +
   ((last_liq_pr > Ask && ! bull) || (last_liq_pr < Bid && bull)) + " " + (last_liq_pr > Ask && ! bull) + " " + (last_liq_pr < Bid && bull) + " " + (Time[0] % Period() * 120) +
   " " + TimeToStr(last_liq_t1,TIME_MINUTES) + " " + TimeToStr(last_liq_t2,TIME_MINUTES) + " " + DoubleToStr(last_liq_pr, Digits()) + " " + DoubleToStr(haOpen, Digits()) +
  " " + DoubleToStr(haClose, Digits()) + " " + DoubleToStr(douHiLo, Digits()) + " " + DoubleToStr(0.0002*Bid, Digits()) + " *(16)*";


OS6_tick | last_rct_ | Time[0] | Period() | bull_ | FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0) 

      temp = "***** last_rct_ (2) -> while(! (tst=ChartSetSymbolPeriod(0, && DrawArrow_OS(6, ****(17)*";           OS6_tick = false;


Typ | tst | t | t1 | t2 | err1 | err2 | tmfr_n | Period() | tmfr_ | Time[0] | tmfr | tmf_Diff | Chart_M5 

         if (tmfr_n==Period()) { temp = "** Passage SANS effet en M"+IntegerToString(tmfr_n)+" avec OrderSend "+(tst_5? "OK": "ANNULE")+" ! (Typ="+IntegerToString(Typ)+
               ", Period()=" + IntegerToString(Period()) + ", Bullish=" + (Bullish) + ") *(18)*";

         else if (tst) { temp = "** Passage en M"+IntegerToString(tmfr_n)+" avec OrderSend "+(tst_5? "OK": "ANNULE")+" ! (Typ="+
               IntegerToString(Typ) + ", Period()=" + IntegerToString(Period()) + ", Bullish=" + (Bullish) + ", t1="+IntegerToString(t1) + ", t2="+IntegerToString(t2) +
               (t2==17 ? ", err2=" + IntegerToString(err2) : "") + ") *(19)*";


Period() | t1 | tim_M15 | Time[0] 

         temp = "** Passage en M5 (x2) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(20)*";


Period() | chk_chartm5(10) | Chart_M5 | StringTrimLeft(ChartSymbol(Chart_M5)) | tmfr_ | tmfr_b | t1 | err | tmfr | tmf_Diff | err2 
tim_Chart_M5b | TimeCurrent() | t5a_Bull_b | bull_ | t5b_Bull_b | FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0) 

      if (tst) { temp = "** Passage en " + (Period()==PERIOD_M5? "M1": "M5") + " à " + TimeToStr(TimeCurrent(),TIME_MINUTES) + " ! (Period()=" + IntegerToString(Period()) +
            ",t1=" + IntegerToString(t1)+", t2=" + IntegerToString(t2) + (t2==17 ? ", err2=" + IntegerToString(err2) : "") + ") *(21)*";


------- DrawArrow_OS sans les copy_file_(3 => "EA-write-file_List TF + HA.txt" ---

t_clo_ | t_clo | i | Bars | j | ticket | blue_time2 | Time[Bars-j-i] | OS1_tick | time_allow | blue_time3 | Time[0] | total2 | total3 | total3_ | op_case01 | op_case0 

            Print("** -> DrawArrow_OS 1* ",bull_," ",bull," ",t_clo_," ",t_clo," ",ticket," ",Bid," ",Ask," ",i," ",j," ",Bars," ",(Bars-j-i)," ",TimeToStr(Time[Bars-j-i],TIME_MINUTES)," ",
               TimeToStr(Time[j],TIME_MINUTES)," | ",pos," ",obj_prClots[pos]," ",vScale," | ",(tmp=AccountBalance())," *(22)*");      //t_clo_ = false;      t_clo = false;    t_blue = true;


op_Liq_ | p | obj_pos0[p-1] | obj_bars[obj_pos0[p-1]] | Bars | bull | Bid | op_Liq_pr | bull | Ask | op_Liq_pr | op_Liq_sp | lastliq | OS6_tick | time_allow | lastliq_ 

            Print("** -> DrawArrow_OS 6 ",bull_," ",bull," ",t_clo_," ",t_clo," ",ticket," ",Bid," ",Ask," ",i," ",j," ",Bars," ",(Bars-j-i)," ",TimeToStr(Time[Bars-j-i],TIME_MINUTES),
               " ",TimeToStr(Time[j],TIME_MINUTES)," | ",pos," ",obj_prClots[pos]," ",vScale," | ",(tmp=AccountBalance())," *(23)*");


obj_bar_cl | Bars | obj_pos[p-1] | obj_bars[obj_pos[p-1]] | ntot | total | Hour() | H1 | H3 | Minute() | H2 | ticket | FileIsExist("ATS-Int_On.txt", FILE_COMMON) | OS2_tick | time_allow | total2_ | total2 

            Print("** -> DrawArrow_OS 2 ",bull_," ",bull," ",ticket," ",Bid," ",Ask," ",p," ",obj_pos[p-1]," ",obj_bars[obj_pos[p-1]]," | ",pos," ",obj_Prices[pos]," ",vScale," *(24)*");


t_opn | p | obj_pos0[p] | obj_bars[obj_pos0[p]] | Bars | t_clo | orge_time | Time[Bars-i+j] | i | Bars | t_orge | orge_time2 | Time[j] | j | ticket | Time[Bars-j-i+1] | OS3_tick | time_allow 

            Print("** -> DrawArrow_OS 3* ",bull_," ",bull," ",t_clo," ",ticket," ",Bid," ",Ask," ",i," ",j," ",Bars," ",(Bars-j-i+1)," ",TimeToStr(Time[Bars-j-i+1],
               TIME_MINUTES)," ",TimeToStr(Time[j],TIME_MINUTES)," | ",pos," ",obj_prClots[pos]," ",vScale," *(25)*");      t_clo = false;    t_orge = true;


op_case01 | t_clo | i | Bars | j | ticket | vilt_time2 | Time[Bars-j-i+1] | OS4_tick | time_allow | vilt_time3 | Time[0] | total2_ | total2 

            Print("** -> DrawArrow_OS 4* ",bull_," ",bull," ",t_clo," ",ticket," ",Bid," ",Ask," ",i," ",j," ",Bars," ",(Bars-j-i+1)," ",TimeToStr(Time[Bars-j-i+1],
               TIME_MINUTES)," ",TimeToStr(Time[j],TIME_MINUTES)," | ",pos," ",obj_prClots[pos]," ",vScale," | ",(tmp=AccountBalance())," *(26)*");   t_clo = false;   t_vilt = true;


tst1 | ticket | bull_ | bull | tst2 | t_rsi515o | tim_flt | TimeCurrent() | Period() | last_ntr_pr | Ask | Bid | last_liq_t1 
obj_bars[prv_pos] | Bars | tmf_Diff | OS5_tick | time_allow | OrderType() | obj_liqTypes[prv_pos] | ticket | t_rsi515 | H1 | H3 | Hour() 
prv_pos | Time[0] | OrderOpenTime() | haCoef | tim_flt | no_OS5 | Ask | Bid | H2 | m3_RSI(0, 2) | t1 | t_M5_M15 | tim_M15 | liqu_x2_n 
OS5_tick | Bars | p | obj_pos[p-1] | obj_bars[obj_pos[p-1]] | obj_Prices[prv_pos] | obj_pos[p-2] | obj_bars[obj_pos[p-2]] | iOpen(NULL,0,Bars-obj_bars[obj_pos[p-2]]) 
rate1c | rate2c | rate3c | rate4c | iClose(NULL,0,Bars-obj_bars[obj_pos[p-2]]) | total2_ 

      Print("** -> DrawArrow_OS 5 ",(obj_bars[prv_pos] >= Bars-1 && (!ticket || bull_==NULL || (bull && ! bull_) || (! bull && bull_)))," ",
. . .
   ((last_ntr_pr > Ask && ! bull) || (last_ntr_pr < Bid && bull)) + " | " + last_ntr_pr," *(27)*"); //*/

bull_ | Ask | rLow | rect_H | iHigh(NULL, 0, 0) | iHigh(NULL, 0, K) | Bid | rHigh | iLow(NULL, 0, 0) | iLow(NULL, 0, K) | K 

            Print("** -> DrawArrow_OS 12 ", bull_, " ", bull, " ", t_night, " ", ticket, " ", TimeToStr(Time[0],TIME_MINUTES)," *(28)*");


str == "-CHN" seulement,
ATS_Time | TimeCurrent() | str | Period() | H2 | StringSubstr(TimeToStr(ATS_Time, TIME_DATE), 8, 2) | Day() | ticket 

      Print("** -> DrawArrow_OS 11 ", bull_, " ", bull, " ", t_night, " ", ticket, " ", TimeToStr(Time[0],TIME_MINUTES)," *(29)*");


DayOfWeek() | H1 | H3 | t_night | Hour() | str | Minute() | Seconds() | bull | FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0) | bull 
FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Sell.txt", 0) | m3_RSI(PERIOD_H1, 2) | ticket | fl_Trade 

      Print("** -> DrawArrow_OS 7 ",bull_," ",bull," ",t_night," ",ticket," ",(str=="-CHN"? IntegerToString(Seconds())+" ": ""),TimeToStr(Time[0],TIME_MINUTES)," *(30)*");


DayOfWeek() | Hour() | Minute() | t_night | m3_RSI(0,3) | ticket 

      Print("** -> DrawArrow_OS 8 ", bull_, " ", bull, " ",t_night, " ", ticket, " ", TimeToStr(Time[0],TIME_MINUTES)," *(31)*");


-------------------------- final v -

f_tmp(1);	-> v
            IntegerToString(t1) + ", t2=" + IntegerToString(t2) + (t2==17 ? ", err2=" + IntegerToString(err2) : "") + ") *(1)*";
      if (last_rct_ == Time[0]) { temp = "***** last_rct_ (1) -> while(! (tst=ChartSetSymbolPeriod(0, && DrawArrow_OS(6, ****(2)*";

f_tmp(3);	-> v
      if (tst) { temp = "** Passage en M5 à "+IntegerToString(HOp)+" H ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(3)*";

f_tmp(4);
            temp = "** REPASSAGE EN M30 / H1 ! ("+IntegerToString(tmfr_)+", t5a_Bullish = "+IntegerToString(t5a_Bullish)+", t5b_Bullish = "+IntegerToString(t5b_Bullish)+
               ", t = "+IntegerToString(t)+", t1 = "+IntegerToString(t1)+", t2 = "+IntegerToString(t2)+(t2==17? ", err2 = "+IntegerToString(GetLastError()): "")+") *(4)*";

f_tmp(5);	-> v
            temp = "** REPASSAGE EN M5 ! (" + IntegerToString(tmfr_b) + ", t5a_Bull_b = "+IntegerToString(t5a_Bull_b) + ", t5b_Bull_b = "+IntegerToString(t5b_Bull_b) +
               ", t1 = "+IntegerToString(t1) + ", t2 = "+IntegerToString(t2) + (t2==17 ? ", err2 = " + IntegerToString(GetLastError()) : "") + ") *(5)*";

f_tmp(6);	-> v
   if (tst2) { temp = "** Sortie de boucle M30 / H1 ! (" + IntegerToString(tmfr_) + ", t = " + IntegerToString(t) + ", t1 = "+IntegerToString(t1) +
         ", t2 = " + IntegerToString(t2) + (t2 == 17? ", err2 = " + IntegerToString(GetLastError()): "") + ") *(6)*";      tst2 = false;

f_tmp(7);	-> v
            temp = "** Passage en M15 (1) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(7)*";

f_tmp(8);	-> v
            temp = "** Passage en M15 (2) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(8)*";

f_tmp(9);	-> v
            temp = "** Passage en M5 (1) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(9)*";

f_tmp(10);	-> v
           temp = "***** Trade STOP LOSS Reached. This Trade Has Been Closed. ("+DoubleToStr(OrderProfit(),Digits())+" - "+Hour()+" - "+DoubleToStr(AccBalance_day,2)+") ****(10)*";

f_tmp(11);	-> v
         temp = "** Passage en M15 (3) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(11)*";

f_tmp(12);	-> v
         temp = "** Passage en M5 (2) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(12)*";

f_tmp(13);	-> v
         temp = "** -> DrawArrow_OS 9 " + bull_ + " " + bull + " " + bull2 + " " + habull + " " + ticket + " " + t_night + " " + TimeToStr(Time[0],TIME_MINUTES) + " " +
            FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)+" "+TimeToStr(last_liq_t1,TIME_MINUTES)+" "+TimeToStr(last_liq_t2,TIME_MINUTES)+" " +
            DoubleToStr(last_liq_pr, Digits())+" "+DoubleToStr(haOpen, Digits())+" "+DoubleToStr(haClose, Digits())+" "+DoubleToStr(douHiLo, Digits())+" " +
            DoubleToStr(0.0002*Bid, Digits()) + " *(13)*";

f_tmp(14);	-> v
         temp = "** -> DrawArrow_OS 10 " + bull_ + " " + bull + " " + bull2 + " " + habull + " " + ticket + " " + t_night + " " + TimeToStr(Time[0],TIME_MINUTES) + " " +
            FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)+" "+TimeToStr(last_liq_t1,TIME_MINUTES)+" "+TimeToStr(last_liq_t2,TIME_MINUTES)+" " +
            DoubleToStr(last_liq_pr, Digits())+" "+DoubleToStr(haOpen, Digits())+" "+DoubleToStr(haClose, Digits())+" "+DoubleToStr(douHiLo, Digits())+" " +
            DoubleToStr(0.0002*Bid, Digits()) + " *(14)*";

if (t_TST1) { temp = "** -> DrawArrow_OS 10 TEST "+Symbol()+" "+bull_+" "+bull+" "+bull2+" "+habull+" "+ticket+" "+t_night+" "+TimeToStr(Time[0],TIME_MINUTES) + " " +
   FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)+" "+TimeToStr(last_liq_t1,TIME_MINUTES)+" "+TimeToStr(last_liq_t2,TIME_MINUTES)+" "+DoubleToStr(last_liq_pr, Digits())+" "+
   DoubleToStr(haOpen, Digits()) + " " + DoubleToStr(haClose, Digits()) + " " + DoubleToStr(douHiLo, Digits()) + " " + DoubleToStr(0.0002*Bid, Digits()) + " *(15)*";

if (t_TST2) { temp = "** -> DrawArrow_OS 10(b) TEST " + bull_ + " " + bull + " " + bull2 + " " + ticket + " " + t_night + " " + TimeToStr(Time[0],TIME_MINUTES) + " " +
   ((last_liq_pr > Ask && ! bull) || (last_liq_pr < Bid && bull)) + " " + (last_liq_pr > Ask && ! bull) + " " + (last_liq_pr < Bid && bull) + " " + (Time[0] % Period() * 120) +
   " " + TimeToStr(last_liq_t1,TIME_MINUTES) + " " + TimeToStr(last_liq_t2,TIME_MINUTES) + " " + DoubleToStr(last_liq_pr, Digits()) + " " + DoubleToStr(haOpen, Digits()) +
  " " + DoubleToStr(haClose, Digits()) + " " + DoubleToStr(douHiLo, Digits()) + " " + DoubleToStr(0.0002*Bid, Digits()) + " *(16)*";

f_tmp(17);	-> v
      temp = "***** last_rct_ (2) -> while(! (tst=ChartSetSymbolPeriod(0, && DrawArrow_OS(6, ****(17)*";           OS6_tick = false;

f_tmp(18);	-> v
         if (tmfr_n==Period()) { temp = "** Passage SANS effet en M"+IntegerToString(tmfr_n)+" avec OrderSend "+(tst_5? "OK": "ANNULE")+" ! (Typ="+IntegerToString(Typ)+
               ", Period()=" + IntegerToString(Period()) + ", Bullish=" + (Bullish) + ") *(18)*";
         else if (tst) { temp = "** Passage en M"+IntegerToString(tmfr_n)+" avec OrderSend "+(tst_5? "OK": "ANNULE")+" ! (Typ="+
               IntegerToString(Typ) + ", Period()=" + IntegerToString(Period()) + ", Bullish=" + (Bullish) + ", t1="+IntegerToString(t1) + ", t2="+IntegerToString(t2) +
               (t2==17 ? ", err2=" + IntegerToString(err2) : "") + ") *(19)*";

f_tmp(20);	-> v
         temp = "** Passage en M5 (x2) à "+TimeToStr(TimeCurrent(),TIME_MINUTES)+" ! (Period()="+IntegerToString(Period())+", t1="+IntegerToString(t1)+") *(20)*";

f_tmp(21);	-> v
      if (tst) { temp = "** Passage en " + (Period()==PERIOD_M5? "M1": "M5") + " à " + TimeToStr(TimeCurrent(),TIME_MINUTES) + " ! (Period()=" + IntegerToString(Period()) +
            ",t1=" + IntegerToString(t1)+", t2=" + IntegerToString(t2) + (t2==17 ? ", err2=" + IntegerToString(err2) : "") + ") *(21)*";

f_tmp(22);	-> v
            Print("** -> DrawArrow_OS 1* ",bull_," ",bull," ",t_clo_," ",t_clo," ",ticket," ",Bid," ",Ask," ",i," ",j," ",Bars," ",(Bars-j-i)," ",TimeToStr(Time[Bars-j-i],TIME_MINUTES)," ",
               TimeToStr(Time[j],TIME_MINUTES)," | ",pos," ",obj_prClots[pos]," ",vScale," | ",(tmp=AccountBalance())," *(22)*");      //t_clo_ = false;      t_clo = false;    t_blue = true;

f_tmp(23);	-> v
            Print("** -> DrawArrow_OS 6 ",bull_," ",bull," ",t_clo_," ",t_clo," ",ticket," ",Bid," ",Ask," ",i," ",j," ",Bars," ",(Bars-j-i)," ",TimeToStr(Time[Bars-j-i],TIME_MINUTES),
               " ",TimeToStr(Time[j],TIME_MINUTES)," | ",pos," ",obj_prClots[pos]," ",vScale," | ",(tmp=AccountBalance())," *(23)*");

f_tmp(24);	-> v
            Print("** -> DrawArrow_OS 2 ",bull_," ",bull," ",ticket," ",Bid," ",Ask," ",p," ",obj_pos[p-1]," ",obj_bars[obj_pos[p-1]]," | ",pos," ",obj_Prices[pos]," ",vScale," *(24)*");

f_tmp(25);	-> v
            Print("** -> DrawArrow_OS 3* ",bull_," ",bull," ",t_clo," ",ticket," ",Bid," ",Ask," ",i," ",j," ",Bars," ",(Bars-j-i+1)," ",TimeToStr(Time[Bars-j-i+1],
               TIME_MINUTES)," ",TimeToStr(Time[j],TIME_MINUTES)," | ",pos," ",obj_prClots[pos]," ",vScale," *(25)*");      t_clo = false;    t_orge = true;

f_tmp(26);	-> v
            Print("** -> DrawArrow_OS 4* ",bull_," ",bull," ",t_clo," ",ticket," ",Bid," ",Ask," ",i," ",j," ",Bars," ",(Bars-j-i+1)," ",TimeToStr(Time[Bars-j-i+1],
               TIME_MINUTES)," ",TimeToStr(Time[j],TIME_MINUTES)," | ",pos," ",obj_prClots[pos]," ",vScale," | ",(tmp=AccountBalance())," *(26)*");   t_clo = false;   t_vilt = true;

f_tmp(27);	-> v
      Print("** -> DrawArrow_OS 5 ",(obj_bars[prv_pos] >= Bars-1 && (!ticket || bull_==NULL || (bull && ! bull_) || (! bull && bull_)))," ",
. . .
   ((last_ntr_pr > Ask && ! bull) || (last_ntr_pr < Bid && bull)) + " | " + last_ntr_pr," *(27)*"); //*/

f_tmp(28);	-> v
            Print("** -> DrawArrow_OS 12 ", bull_, " ", bull, " ", t_night, " ", ticket, " ", TimeToStr(Time[0],TIME_MINUTES)," *(28)*");

f_tmp(29);	-> v		str == "-CHN" seulement,
      Print("** -> DrawArrow_OS 11 ", bull_, " ", bull, " ", t_night, " ", ticket, " ", TimeToStr(Time[0],TIME_MINUTES)," *(29)*");

f_tmp(30);	-> v
      Print("** -> DrawArrow_OS 7 ",bull_," ",bull," ",t_night," ",ticket," ",(str=="-CHN"? IntegerToString(Seconds())+" ": ""),TimeToStr(Time[0],TIME_MINUTES)," *(30)*");

f_tmp(31);	-> v
      Print("** -> DrawArrow_OS 8 ", bull_, " ", bull, " ",t_night, " ", ticket, " ", TimeToStr(Time[0],TIME_MINUTES)," *(31)*");

--------------------------

void f_tmp(int i) { string str;
      switch(i) {
         case 1: 
str = "Hour() | H1 | H3 | HOp | str | Seconds() | last_rct_ | Time[0] | Period() | t_M5_M15 | t_M15_H1 | tmfr_ | tmfr | " +
   "t1 | err | t2 | err2 | Chart_M5 | chk_chartm5(3) | tim_Chart_M5 | bull_ | t5a_Bullish | t5b_Bullish | FileIsExist(\"ATS-Ind_On-Off\\ATS-Ind5\"+str+\"_Buy.txt\", 0) | t_night";
             break;  
         case 3: 
str = "str | Hour() | HOp | Minute() | Period() | t1";
             break;  
         case 4: 
str = "Hour() | HOp | Period() | TimeCurrent() | tim_Chart_M5 | tmfr_ | m3_RSI(PERIOD_M5, 2) | tst2 | nb_ticks | nb_tcks_N | " +
   "chk_chartm5(4) | Chart_M5 | StringTrimLeft(ChartSymbol(Chart_M5)) | bull_ | t5a_Bullish | t5b_Bullish | FileIsExist(\"ATS-Ind_On-Off\\ATS-Ind5\"+str+\"_Buy.txt\", 0) | " +
   "t1 | err | tmfr_ | t2 | chk_chartm5(5) | t_M15_H1";
             break;  
         case 5: 
str = "Period() | TimeCurrent() | tim_Chart_M5b | tmfr_b | chk_chartm5(6) | Chart_M5 | StringTrimLeft(ChartSymbol(Chart_M5)) | " +
   "str | bull_ | t5a_Bull_b | t5b_Bull_b | FileIsExist(\"ATS-Ind_On-Off\\ATS-Ind5\"+str+\"_Buy.txt\", 0) | t1 | t2 | chk_chartm5(7)";
             break;  
         case 6: 
str = "tst2 | Period() | m3_RSI(0, 2) | nb_ticks | nb_tcks_N";
             break;  
         case 7: 
str = "tst1 | ticket | bull_ | bull | tst2 | t_rsi515o | tim_flt | TimeCurrent() | Period() | last_ntr_pr | Ask | Bid | last_liq_t1 | " +
   "obj_bars[prv_pos] | Bars | tmf_Diff | OS5_tick | time_allow | OrderType() | obj_liqTypes[prv_pos] | ticket | t_rsi515 | H1 | H3 | Hour() | " +
   "Time[0] | OrderOpenTime() | haCoef | tim_flt | no_OS5 | Ask | Bid | H2 | m3_RSI(0, 2) | t1 | t_M5_M15 | tim_M15 | liqu_x2_n";
             break;  
         case 8: 
str = "nb_ticks | nb_tcks_N | m3_RSI(0, 2) | t_M5_M15 | Period() | Hour() | t1 | tim_M15 | Time[0] | tmf_Diff";
             break;  
         case 9: 
str = "t_rsi51_ | t_rsi515 | t_rsi515o | tim_M15 | Time[0] | Period() | m3_RSI(PERIOD_M5, 2) | t1 | t_M5_M15 | tmf_Diff";
             break;  
         case 10: 
str = "trd_on | OrderSymbol() | ticket | bull2 | OrderType() | OrderProfit() | OrderSwap() | OrderCommission() | AccBalance_day | lot | Bid | Ask | slip | OrderProfit()";
             break;  
         case 11: 
str = "tim_M15 | Time[0] | last_liq_t1 | iBarShift(NULL,0,last_liq_t1,false) | m3_RSI(0, 2) | Period() | H1 | H3 | Hour() | H2 | t1 | t_M5_M15 | tmf_Diff";
             break;  
         case 12: 
str = "m3_RSI(PERIOD_M5, 2) | m3_RSI(PERIOD_H1, 2) | Period() | t1 | tim_M15 | tmf_Diff";
             break;  
         case 13: 
str = "Period() | last_liq_t1 | iBarShift(NULL,0,last_liq_t1,false) | d_HiLo | last_liq_pr | Ask | Bid | douHiLo | bull2 | tim_flt | TimeCurrent() | Period() | " +
   "ticket | t_night | OS9_tick | habull | FileIsExist(\"ATS-Ind_On-Off\\ATS-Ind5\"+str+\"_Sell.txt\", 0) | FileIsExist(\"ATS-Ind_On-Off\\ATS-Ind5\"+str+\"_Buy.txt\", 0) | bull_";
             break;  
         case 14: 
str = "ticket | habull | bull2 | FileIsExist(\"ATS-Ind_On-Off\\ATS-Ind5\"+str+\"_Buy.txt\", 0) | FileIsExist(\"ATS-Ind_On-Off\\ATS-Ind5\"+str+\"_Sell.txt\", 0)";
             break;  
         case 17: 
str = "OS6_tick | last_rct_ | Time[0] | Period() | bull_ | FileIsExist(\"ATS-Ind_On-Off\\ATS-Ind5\"+str+\"_Buy.txt\", 0)";
             break;  
         case 18: 
str = "Typ | tst | t | t1 | t2 | err1 | err2 | tmfr_n | Period() | tmfr_ | Time[0] | tmfr | tmf_Diff | Chart_M5";
             break;  
         case 20: 
str = "Period() | t1 | tim_M15 | Time[0]";
             break;  
         case 21: 
str = "Period() | chk_chartm5(10) | Chart_M5 | StringTrimLeft(ChartSymbol(Chart_M5)) | tmfr_ | tmfr_b | t1 | err | tmfr | tmf_Diff | err2 | " +
   "tim_Chart_M5b | TimeCurrent() | t5a_Bull_b | bull_ | t5b_Bull_b | FileIsExist(\"ATS-Ind_On-Off\\ATS-Ind5\"+str+\"_Buy.txt\", 0)";
             break;  
         case 22: 
str = "t_clo_ | t_clo | i | Bars | j | ticket | blue_time2 | Time[Bars-j-i] | OS1_tick | time_allow | blue_time3 | Time[0] | total2 | total3 | total3_ | op_case01 | op_case0";
             break;  
         case 23: 
str = "op_Liq_ | p | obj_pos0[p-1] | obj_bars[obj_pos0[p-1]] | Bars | bull | Bid | op_Liq_pr | bull | Ask | op_Liq_pr | op_Liq_sp | lastliq | OS6_tick | time_allow | lastliq_";
             break;  
         case 24: 
str = "obj_bar_cl | Bars | obj_pos[p-1] | obj_bars[obj_pos[p-1]] | ntot | total | Hour() | H1 | H3 | Minute() | H2 | ticket | FileIsExist(\"ATS-Int_On.txt\", FILE_COMMON) | OS2_tick | time_allow | total2_";
             break;  
         case 25: 
str = "t_opn | p | obj_pos0[p] | obj_bars[obj_pos0[p]] | Bars | t_clo | orge_time | Time[Bars-i+j] | i | Bars | t_orge | orge_time2 | Time[j] | j | ticket | Time[Bars-j-i+1] | OS3_tick | time_allow";
             break;  
         case 26: 
str = "op_case01 | t_clo | i | Bars | j | ticket | vilt_time2 | Time[Bars-j-i+1] | OS4_tick | time_allow | vilt_time3 | Time[0] | total2_ | total2";
             break;  
         case 27: 
str = "OS5_tick | Bars | p | obj_pos[p-1] | obj_bars[obj_pos[p-1]] | obj_Prices[prv_pos] | obj_pos[p-2] | obj_bars[obj_pos[p-2]] | iOpen(NULL,0,Bars-obj_bars[obj_pos[p-2]]) | " +
   "rate1c | rate2c | rate3c | rate4c | iClose(NULL,0,Bars-obj_bars[obj_pos[p-2]]) | total2_";
             break;  
         case 28: 
str = "bull_ | Ask | rLow | rect_H | iHigh(NULL, 0, 0) | iHigh(NULL, 0, K) | Bid | rHigh | iLow(NULL, 0, 0) | iLow(NULL, 0, K) | K";
             break;  
         case 29: 	// str == "-CHN" seulement,
str = "ATS_Time | TimeCurrent() | str | Period() | H2 | StringSubstr(TimeToStr(ATS_Time, TIME_DATE), 8, 2) | Day() | ticket";
             break;  
         case 30: 
str = "DayOfWeek() | H1 | H3 | t_night | Hour() | str | Minute() | Seconds() | bull | str | FileIsExist(\"ATS-Ind_On-Off\\ATS-Ind5\"+str+\"_Buy.txt\", 0) | bull | " +
   "FileIsExist(\"ATS-Ind_On-Off\\ATS-Ind5\"+str+\"_Sell.txt\", 0) | m3_RSI(PERIOD_H1, 2) | ticket | fl_Trade";
             break;  
         case 31: 
str = "DayOfWeek() | Hour() | Minute() | t_night | m3_RSI(0,3) | ticket";
             break; }

      copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " + str);

/*      switch(i) {
         case 1: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +   //      case 1:
   Hour()+" | "+H1+" | "+H3+" | "+HOp+" | "+str+" | "+Seconds()+" | "+last_rct_+" | "+Time[0]+" | "+Period()+" | "+t_M5_M15+" | "+t_M15_H1+" | "+tmfr_+" | "+tmfr +" | "+t1+" | "+err+" | "+
   t2+" | "+err2+" | "+Chart_M5+" | "+chk_chartm5(3)+" | "+tim_Chart_M5+" | "+bull_+" | "+t5a_Bullish+" | "+t5b_Bullish+" | "+FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)+" | "+t_night);
             break;  
         case 3: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 3:
   str+" | "+Hour()+" | "+HOp+" | "+Minute()+" | "+Period()+" | "+t1);
             break;  
         case 4: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 4:
   Hour()+" | "+HOp+" | "+Period()+" | "+TimeCurrent()+" | "+tim_Chart_M5+" | "+tmfr_+" | "+m3_RSI(PERIOD_M5, 2)+" | "+tst2+" | "+nb_ticks+" | "+nb_tcks_N+" | "+
   chk_chartm5(4)+" | "+Chart_M5+" | "+StringTrimLeft(ChartSymbol(Chart_M5))+" | "+bull_+" | "+t5a_Bullish+" | "+t5b_Bullish+" | "+FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)+" | "+
   t1+" | "+err+" | "+tmfr_+" | "+t2+" | "+chk_chartm5(5)+" | "+t_M15_H1);
             break;  
         case 5: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 5:
   Period()+" | "+TimeCurrent()+" | "+tim_Chart_M5b+" | "+tmfr_b+" | "+chk_chartm5(6)+" | "+Chart_M5+" | "+StringTrimLeft(ChartSymbol(Chart_M5))+" | "+
   str+" | "+bull_+" | "+t5a_Bull_b+" | "+t5b_Bull_b+" | "+FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)+" | "+t1+" | "+t2+" | "+chk_chartm5(7));
             break;  
         case 6: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 6:
   tst2+" | "+Period()+" | "+m3_RSI(0, 2)+" | "+nb_ticks+" | "+nb_tcks_N);
             break;  
         case 7: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 7:
   tst1+" | "+ticket+" | "+bull_+" | "+bull+" | "+tst2+" | "+t_rsi515o+" | "+tim_flt+" | "+TimeCurrent()+" | "+Period()+" | "+last_ntr_pr+" | "+Ask+" | "+Bid+" | "+last_liq_t1+" | "+
   obj_bars[prv_pos]+" | "+Bars+" | "+tmf_Diff+" | "+OS5_tick+" | "+time_allow+" | "+OrderType()+" | "+obj_liqTypes[prv_pos]+" | "+ticket+" | "+t_rsi515+" | "+H1+" | "+H3+" | "+Hour()+" | "+
   Time[0]+" | "+OrderOpenTime()+" | "+haCoef+" | "+tim_flt+" | "+no_OS5+" | "+Ask+" | "+Bid+" | "+H2+" | "+m3_RSI(0, 2)+" | "+t1+" | "+t_M5_M15+" | "+tim_M15+" | "+liqu_x2_n);
             break;  
         case 8: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 8:
   nb_ticks+" | "+nb_tcks_N+" | "+m3_RSI(0, 2)+" | "+t_M5_M15+" | "+Period()+" | "+Hour()+" | "+t1+" | "+tim_M15+" | "+Time[0]+" | "+tmf_Diff);
             break;  
         case 9: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 9:
   t_rsi51_+" | "+t_rsi515+" | "+t_rsi515o+" | "+tim_M15+" | "+Time[0]+" | "+Period()+" | "+m3_RSI(PERIOD_M5, 2)+" | "+t1+" | "+t_M5_M15+" | "+tmf_Diff);
             break;  
         case 10: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 10:
trd_on+" | "+OrderSymbol()+" | "+ticket+" | "+bull2+" | "+OrderType()+" | "+OrderProfit()+" | "+OrderSwap()+" | "+OrderCommission()+" | "+AccBalance_day+" | "+lot+" | "+Bid+" | "+Ask+" | "+slip+" | "+OrderProfit());
             break;  
         case 11: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 11:
   tim_M15+" | "+Time[0]+" | "+last_liq_t1+" | "+iBarShift(NULL,0,last_liq_t1,false)+" | "+m3_RSI(0, 2)+" | "+Period()+" | "+H1+" | "+H3+" | "+Hour()+" | "+H2+" | "+t1+" | "+t_M5_M15+" | "+tmf_Diff);
             break;  
         case 12: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 12:
   m3_RSI(PERIOD_M5, 2)+" | "+m3_RSI(PERIOD_H1, 2)+" | "+Period()+" | "+t1+" | "+tim_M15+" | "+tmf_Diff);
             break;  
         case 13: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 13:
   Period()+" | "+last_liq_t1+" | "+iBarShift(NULL,0,last_liq_t1,false)+" | "+d_HiLo+" | "+last_liq_pr+" | "+Ask+" | "+Bid+" | "+douHiLo+" | "+bull2+" | "+tim_flt+" | "+TimeCurrent()+" | "+Period()+" | "+
   ticket+" | "+t_night+" | "+OS9_tick+" | "+habull+" | "+FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Sell.txt", 0)+" | "+FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)+" | "+bull_);
             break;  
         case 14: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 14:
   ticket+" | "+habull+" | "+bull2+" | "+FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)+" | "+FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Sell.txt", 0));
             break;  
         case 17: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 17:
   OS6_tick+" | "+last_rct_+" | "+Time[0]+" | "+Period()+" | "+bull_+" | "+FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0));
             break;  
         case 18: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 18:
   Typ+" | "+tst+" | "+t+" | "+t1+" | "+t2+" | "+err1+" | "+err2+" | "+tmfr_n+" | "+Period()+" | "+tmfr_+" | "+Time[0]+" | "+tmfr+" | "+tmf_Diff+" | "+Chart_M5);
             break;  
         case 20: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 20:
   Period()+" | "+t1+" | "+tim_M15+" | "+Time[0]);
             break;  
         case 21: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 21:
   Period()+" | "+chk_chartm5(10)+" | "+Chart_M5+" | "+StringTrimLeft(ChartSymbol(Chart_M5))+" | "+tmfr_+" | "+tmfr_b+" | "+t1+" | "+err+" | "+tmfr+" | "+tmf_Diff+" | "+err2+" | "+
   tim_Chart_M5b+" | "+TimeCurrent()+" | "+t5a_Bull_b+" | "+bull_+" | "+t5b_Bull_b+" | "+FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0));
             break;  
         case 22: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 22:
t_clo_+" | "+t_clo+" | "+i+" | "+Bars+" | "+j+" | "+ticket+" | "+blue_time2+" | "+Time[Bars-j-i]+" | "+OS1_tick+" | "+time_allow+" | "+blue_time3+" | "+Time[0]+" | "+total2+" | "+total3+" | "+total3_+" | "+op_case01+" | "+op_case0);
             break;  
         case 23: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 23:
op_Liq_+" | "+p+" | "+obj_pos0[p-1]+" | "+obj_bars[obj_pos0[p-1]]+" | "+Bars+" | "+bull+" | "+Bid+" | "+op_Liq_pr+" | "+bull+" | "+Ask+" | "+op_Liq_pr+" | "+op_Liq_sp+" | "+lastliq+" | "+OS6_tick+" | "+time_allow+" | "+lastliq_);
             break;  
         case 24: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 24:
obj_bar_cl+" | "+Bars+" | "+obj_pos[p-1]+" | "+obj_bars[obj_pos[p-1]]+" | "+ntot+" | "+total+" | "+Hour()+" | "+H1+" | "+H3+" | "+Minute()+" | "+H2+" | "+ticket+" | "+FileIsExist("ATS-Int_On.txt", FILE_COMMON)+" | "+OS2_tick+" | "+time_allow+" | "+total2_+" | "+total2);
             break;  
         case 25: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 25:
t_opn+" | "+p+" | "+obj_pos0[p]+" | "+obj_bars[obj_pos0[p]]+" | "+Bars+" | "+t_clo+" | "+orge_time+" | "+Time[Bars-i+j]+" | "+i+" | "+Bars+" | "+t_orge+" | "+orge_time2+" | "+Time[j]+" | "+j+" | "+ticket+" | "+Time[Bars-j-i+1]+" | "+OS3_tick+" | "+time_allow);
             break;  
         case 26: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 26:
   op_case01+" | "+t_clo+" | "+i+" | "+Bars+" | "+j+" | "+ticket+" | "+vilt_time2+" | "+Time[Bars-j-i+1]+" | "+OS4_tick+" | "+time_allow+" | "+vilt_time3+" | "+Time[0]+" | "+total2_+" | "+total2);
             break;  
         case 27: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 27:
   OS5_tick+" | "+Bars+" | "+p+" | "+obj_pos[p-1]+" | "+obj_bars[obj_pos[p-1]]+" | "+obj_Prices[prv_pos]+" | "+obj_pos[p-2]+" | "+obj_bars[obj_pos[p-2]]+" | "+iOpen(NULL,0,Bars-obj_bars[obj_pos[p-2]])+" | "+
   rate1c+" | "+rate2c+" | "+rate3c+" | "+rate4c+" | "+iClose(NULL,0,Bars-obj_bars[obj_pos[p-2]])+" | "+total2_);
             break;  
         case 28: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 28:
   bull_+" | "+Ask+" | "+rLow+" | "+rect_H+" | "+iHigh(NULL, 0, 0)+" | "+iHigh(NULL, 0, K)+" | "+Bid+" | "+rHigh+" | "+iLow(NULL, 0, 0)+" | "+iLow(NULL, 0, K)+" | "+K);
             break;  
         case 29: 	// str == "-CHN" seulement,
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 29:
   ATS_Time+" | "+TimeCurrent()+" | "+str+" | "+Period()+" | "+H2+" | "+StringSubstr(TimeToStr(ATS_Time, TIME_DATE), 8, 2)+" | "+Day()+" | "+ticket);
             break;  
         case 30: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 30:
   DayOfWeek()+" | "+H1+" | "+H3+" | "+t_night+" | "+Hour()+" | "+str+" | "+Minute()+" | "+Seconds()+" | "+bull+" | "+FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Buy.txt", 0)+" | "+bull+" | "+
   FileIsExist("ATS-Ind_On-Off\\ATS-Ind5"+str+"_Sell.txt", 0)+" | "+m3_RSI(PERIOD_H1, 2)+" | "+ticket+" | "+fl_Trade);
             break;  
         case 31: 
copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) + " " +    //      case 31:
   DayOfWeek()+" | "+Hour()+" | "+Minute()+" | "+t_night+" | "+m3_RSI(0,3)+" | "+ticket);
             break; }

      copy_file_(9, TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES) +" "+Symbol()+","+stmfr+": " + str); */ }

