int f0_9(string As_0,string As_8,int Ai_16,int Ai_20)
  {
   int str2int_24 = StrToInteger(StringSubstr(As_0, 0, 3));
   int str2int_28 = StrToInteger(StringSubstr(As_0, 4, 3));
   int str2int_32 = StrToInteger(StringSubstr(As_0, 8, 3));
   int str2int_36 = StrToInteger(StringSubstr(As_8, 0, 3));
   int str2int_40 = StrToInteger(StringSubstr(As_8, 4, 3));
   int str2int_44 = StrToInteger(StringSubstr(As_8, 8, 3));
   if(str2int_24 > str2int_36) Gi_380 = str2int_24 + (str2int_36 - str2int_24) / Ai_16 * Ai_20;
   if(str2int_24 < str2int_36) Gi_380 = str2int_24 - (str2int_24 - str2int_36) / Ai_16 * Ai_20;
   if(str2int_28 > str2int_40) Gi_384 = str2int_28 + (str2int_40 - str2int_28) / Ai_16 * Ai_20;
   if(str2int_28 < str2int_40) Gi_384 = str2int_28 - (str2int_28 - str2int_40) / Ai_16 * Ai_20;
   if(str2int_32 > str2int_44) Gi_388 = str2int_32 + (str2int_44 - str2int_32) / Ai_16 * Ai_20;
   if(str2int_32 < str2int_44) Gi_388 = str2int_32 - (str2int_32 - str2int_44) / Ai_16 * Ai_20;
   Gi_384 *= 256;
   Gi_388<<= 16;
   return (Gi_380 + Gi_384 + Gi_388);
  }
// 2795031E32D1FE85C9BD72823A8B4142
void f0_2()
  {
   double Lda_0[10];
   double Lda_4[10];
   double Lda_8[10];
   double Lda_12[10];
   int Li_16;
   int Li_20;
   int Li_24;
   int Li_32;
   if(Period()<G_timeframe_396)
     {
      ArrayCopySeries(Lda_0,2,Symbol(),G_timeframe_396);
      ArrayCopySeries(Lda_4,1,Symbol(),G_timeframe_396);
      ArrayCopySeries(Lda_8,0,Symbol(),G_timeframe_396);
      ArrayCopySeries(Lda_12,3,Symbol(),G_timeframe_396);
      Li_32=3;
      for(int Li_28=2; Li_28>=0; Li_28--)
        {
         Li_20 = Time[0] + Period() * (90 * Li_32);
         Li_24 = Time[0] + 90 * (Period() * (Li_32 + 1));
         if(ObjectFind("BD"+Li_28)==-1)
           {
            if(Lda_8[Li_28]>Lda_12[Li_28]) Li_16=170;
            else Li_16=43520;
            f0_6("D"+Li_28,Li_20,Li_24,Lda_8[Li_28],Lda_12[Li_28],Lda_4[Li_28],Lda_0[Li_28],Li_16);
              } else {
            if(Lda_8[Li_28]>Lda_12[Li_28]) Li_16=170;
            else Li_16=43520;
            f0_5("D"+Li_28,Li_20,Li_24,Lda_8[Li_28],Lda_12[Li_28],Lda_4[Li_28],Lda_0[Li_28],Li_16);
           }
         Li_32++;
         Li_32++;
        }
     }
  }
// 9F92396C933453E2D1202389D9EFB0E5
void f0_6(string As_0,int A_datetime_8,int A_datetime_12,double A_price_16,double A_price_24,double A_price_32,double A_price_40,color A_color_48)
  {
   if(A_price_16==A_price_24) A_color_48=Gray;
   ObjectCreate("B"+As_0,OBJ_RECTANGLE,0,A_datetime_8,A_price_16,A_datetime_12,A_price_24);
   ObjectSet("B"+As_0,OBJPROP_STYLE,STYLE_SOLID);
   ObjectSet("B"+As_0,OBJPROP_COLOR,A_color_48);
   ObjectSet("B"+As_0,OBJPROP_BACK,TRUE);
   int datetime_52=A_datetime_8+(A_datetime_12-A_datetime_8)/2;
   ObjectCreate("S"+As_0,OBJ_TREND,0,datetime_52,A_price_32,datetime_52,A_price_40);
   ObjectSet("S"+As_0,OBJPROP_COLOR,A_color_48);
   ObjectSet("S"+As_0,OBJPROP_BACK,TRUE);
   ObjectSet("S"+As_0,OBJPROP_RAY,FALSE);
   ObjectSet("S"+As_0,OBJPROP_WIDTH,2);
  }
// 88F07BF2A3E2A04159AC984719B3F549
void f0_5(string As_0,int A_datetime_8,int A_datetime_12,double Ad_16,double Ad_24,double Ad_32,double Ad_40,color A_color_48)
  {
   if(Ad_16==Ad_24) A_color_48=Gray;
   ObjectSet("B"+As_0,OBJPROP_TIME1,A_datetime_8);
   ObjectSet("B"+As_0,OBJPROP_PRICE1,Ad_16);
   ObjectSet("B"+As_0,OBJPROP_TIME2,A_datetime_12);
   ObjectSet("B"+As_0,OBJPROP_PRICE2,Ad_24);
   ObjectSet("B"+As_0,OBJPROP_BACK,TRUE);
   ObjectSet("B"+As_0,OBJPROP_COLOR,A_color_48);
   int datetime_52=A_datetime_8+(A_datetime_12-A_datetime_8)/2;
   ObjectSet("S"+As_0,OBJPROP_TIME1,datetime_52);
   ObjectSet("S"+As_0,OBJPROP_PRICE1,Ad_32);
   ObjectSet("S"+As_0,OBJPROP_TIME2,datetime_52);
   ObjectSet("S"+As_0,OBJPROP_PRICE2,Ad_40);
   ObjectSet("S"+As_0,OBJPROP_BACK,TRUE);
   ObjectSet("S"+As_0,OBJPROP_WIDTH,2);
   ObjectSet("S"+As_0,OBJPROP_COLOR,A_color_48);
  }
// CDF7118C61A4AA4E389CF2547874D314
void f0_7()
  {
   double Ld_0=(Ask-Bid)/Gd_420;
   string text_8="Spread: "+DoubleToStr(Ld_0,1)+" pips";
   if(ObjectFind(G_name_412)<0)
     {
      ObjectCreate(G_name_412,OBJ_LABEL,0,0,0);
      ObjectSet(G_name_412,OBJPROP_CORNER,1);
      ObjectSet(G_name_412,OBJPROP_YDISTANCE,260);
      ObjectSet(G_name_412,OBJPROP_XDISTANCE,10);
      ObjectSetText(G_name_412,text_8,13,"Arial",G_color_408);
     }
   ObjectSetText(G_name_412,text_8);
   WindowRedraw();
  }
// 39C409D2E4985FE63B2929843BE560CF
void f0_3()
  {
   int Li_8=Time[0]+60*Period()-TimeCurrent();
   double Ld_0=Li_8/60.0;
   int Li_12=Li_8%60;
   Li_8=(Li_8-Li_8%60)/60;
   Comment(Li_8+" minutes "+Li_12+" seconds left to bar end");
   ObjectDelete("time");
   if(ObjectFind("time")!=0)
     {
      ObjectCreate("time",OBJ_TEXT,0,Time[0],Close[0]+0.0005);
      ObjectSetText("time","                                 <--"+Li_8+":"+Li_12,13,"Verdana",Yellow);
      return;
     }
   ObjectMove("time",0,Time[0],Close[0]+0.0005);
  }
// 0D09CCEE6F8BC2AF782594ED51D3E1A7
void f0_0()
  {
   int Li_0=iBarShift(NULL,PERIOD_D1,Time[0])+1;
   G_ihigh_444= iHigh(NULL,PERIOD_D1,Li_0);
   G_ilow_452 = iLow(NULL,PERIOD_D1,Li_0);
   G_datetime_468=iTime(NULL,PERIOD_D1,Li_0);
   if(TimeDayOfWeek(G_datetime_468)==0)
     {
      G_ihigh_444= MathMax(G_ihigh_444,iHigh(NULL,PERIOD_D1,Li_0+1));
      G_ilow_452 = MathMin(G_ilow_452,iLow(NULL,PERIOD_D1,Li_0+1));
     }
   Gd_460=G_ihigh_444-G_ilow_452;
   f0_1();
  }
// 177469F06A7487E6FDDCBE94FDB6FD63
int f0_1()
  {
   if(ObjectFind("FiboUp")==-1) ObjectCreate("FiboUp",OBJ_FIBO,0,G_datetime_468,G_ihigh_444+Gd_460,G_datetime_468,G_ihigh_444);
   else
     {
      ObjectSet("FiboUp",OBJPROP_TIME2,G_datetime_468);
      ObjectSet("FiboUp",OBJPROP_TIME1,G_datetime_468);
      ObjectSet("FiboUp",OBJPROP_PRICE1,G_ihigh_444+Gd_460);
      ObjectSet("FiboUp",OBJPROP_PRICE2,G_ihigh_444);
     }
   ObjectSet("FiboUp",OBJPROP_LEVELCOLOR,G_color_428);
   ObjectSet("FiboUp",OBJPROP_FIBOLEVELS,13);
   ObjectSet("FiboUp",OBJPROP_FIRSTLEVEL,0.0);
   ObjectSetFiboDescription("FiboUp",0,"(100.0%) -  %$");
   ObjectSet("FiboUp",211,0.236);
   ObjectSetFiboDescription("FiboUp",1,"(123.6%) -  %$");
   ObjectSet("FiboUp",212,0.382);
   ObjectSetFiboDescription("FiboUp",2,"(138.2%) -  %$");
   ObjectSet("FiboUp",213,0.5);
   ObjectSetFiboDescription("FiboUp",3,"(150.0%) -  %$");
   ObjectSet("FiboUp",214,0.618);
   ObjectSetFiboDescription("FiboUp",4,"(161.8%) -  %$");
   ObjectSet("FiboUp",215,0.764);
   ObjectSetFiboDescription("FiboUp",5,"(176.4%) -  %$");
   ObjectSet("FiboUp",216,1.0);
   ObjectSetFiboDescription("FiboUp",6,"(200.0%) -  %$");
   ObjectSet("FiboUp",217,1.236);
   ObjectSetFiboDescription("FiboUp",7,"(223.6%) -  %$");
   ObjectSet("FiboUp",218,1.5);
   ObjectSetFiboDescription("FiboUp",8,"(250.0%) -  %$");
   ObjectSet("FiboUp",219,1.618);
   ObjectSetFiboDescription("FiboUp",9,"(261.8%) -  %$");
   ObjectSet("FiboUp",220,2.0);
   ObjectSetFiboDescription("FiboUp",10,"(300.0%) -  %$");
   ObjectSet("FiboUp",221,2.5);
   ObjectSetFiboDescription("FiboUp",11,"(350.0%) -  %$");
   ObjectSet("FiboUp",222,3.0);
   ObjectSetFiboDescription("FiboUp",12,"(400.0%) -  %$");
   ObjectSet("FiboUp",223,3.5);
   ObjectSetFiboDescription("FiboUp",13,"(450.0%) -  %$");
   ObjectSet("FiboUp",224,4.0);
   ObjectSetFiboDescription("FiboUp",14,"(500.0%) -  %$");
   ObjectSet("FiboUp",OBJPROP_RAY,TRUE);
   ObjectSet("FiboUp",OBJPROP_BACK,TRUE);
   if(ObjectFind("FiboDn")==-1) ObjectCreate("FiboDn",OBJ_FIBO,0,G_datetime_468,G_ilow_452-Gd_460,G_datetime_468,G_ilow_452);
   else
     {
      ObjectSet("FiboDn",OBJPROP_TIME2,G_datetime_468);
      ObjectSet("FiboDn",OBJPROP_TIME1,G_datetime_468);
      ObjectSet("FiboDn",OBJPROP_PRICE1,G_ilow_452-Gd_460);
      ObjectSet("FiboDn",OBJPROP_PRICE2,G_ilow_452);
     }
   ObjectSet("FiboDn",OBJPROP_LEVELCOLOR,G_color_436);
   ObjectSet("FiboDn",OBJPROP_FIBOLEVELS,19);
   ObjectSet("FiboDn",OBJPROP_FIRSTLEVEL,0.0);
   ObjectSetFiboDescription("FiboDn",0,"(0.0%) -  %$");
   ObjectSet("FiboDn",211,0.236);
   ObjectSetFiboDescription("FiboDn",1,"(-23.6%) -  %$");
   ObjectSet("FiboDn",212,0.382);
   ObjectSetFiboDescription("FiboDn",2,"(-38.2%) -  %$");
   ObjectSet("FiboDn",213,0.5);
   ObjectSetFiboDescription("FiboDn",3,"(-50.0%) -  %$");
   ObjectSet("FiboDn",214,0.618);
   ObjectSetFiboDescription("FiboDn",4,"(-61.8%) -  %$");
   ObjectSet("FiboDn",215,0.764);
   ObjectSetFiboDescription("FiboDn",5,"(-76.4%) -  %$");
   ObjectSet("FiboDn",216,1.0);
   ObjectSetFiboDescription("FiboDn",6,"(-100.0%) -  %$");
   ObjectSet("FiboDn",217,1.236);
   ObjectSetFiboDescription("FiboDn",7,"(-123.6%) -  %$");
   ObjectSet("FiboDn",218,1.382);
   ObjectSetFiboDescription("FiboDn",8,"(-138.2%) -  %$");
   ObjectSet("FiboDn",219,1.5);
   ObjectSetFiboDescription("FiboDn",9,"(-150.0%) -  %$");
   ObjectSet("FiboDn",220,1.618);
   ObjectSetFiboDescription("FiboDn",10,"(-161.8%) -  %$");
   ObjectSet("FiboDn",221,1.764);
   ObjectSetFiboDescription("FiboDn",11,"(-176.4%) -  %$");
   ObjectSet("FiboDn",222,2.0);
   ObjectSetFiboDescription("FiboDn",12,"(-200.0%) -  %$");
   ObjectSet("FiboDn",223,2.5);
   ObjectSetFiboDescription("FiboDn",13,"(-250.0%) -  %$");
   ObjectSet("FiboDn",224,3.0);
   ObjectSetFiboDescription("FiboDn",14,"(-300.0%) -  %$");
   ObjectSet("FiboDn",225,3.5);
   ObjectSetFiboDescription("FiboDn",15,"(-350.0%) -  %$");
   ObjectSet("FiboDn",226,4.0);
   ObjectSetFiboDescription("FiboDn",16,"(-400.0%) -  %$");
   ObjectSet("FiboDn",227,4.5);
   ObjectSetFiboDescription("FiboDn",17,"(-450.0%) -  %$");
   ObjectSet("FiboDn",228,5.0);
   ObjectSetFiboDescription("FiboDn",18,"(-500.0%) -  %$");
   ObjectSet("FiboDn",OBJPROP_RAY,TRUE);
   ObjectSet("FiboDn",OBJPROP_BACK,TRUE);
   if(Gi_440)
     {
      if(ObjectFind("FiboIn")==-1) ObjectCreate("FiboIn",OBJ_FIBO,0,G_datetime_468,G_ihigh_444,G_datetime_468+86400,G_ilow_452);
      else
        {
         ObjectSet("FiboIn",OBJPROP_TIME2,G_datetime_468);
         ObjectSet("FiboIn",OBJPROP_TIME1,G_datetime_468+86400);
         ObjectSet("FiboIn",OBJPROP_PRICE1,G_ihigh_444);
         ObjectSet("FiboIn",OBJPROP_PRICE2,G_ilow_452);
        }
      ObjectSet("FiboIn",OBJPROP_LEVELCOLOR,G_color_432);
      ObjectSet("FiboIn",OBJPROP_FIBOLEVELS,7);
      ObjectSet("FiboIn",OBJPROP_FIRSTLEVEL,0.0);
      ObjectSetFiboDescription("FiboIn",0,"Daily LOW (0.0) -  %$");
      ObjectSet("FiboIn",211,0.236);
      ObjectSetFiboDescription("FiboIn",1,"(23.6) -  %$");
      ObjectSet("FiboIn",212,0.382);
      ObjectSetFiboDescription("FiboIn",2,"(38.2) -  %$");
      ObjectSet("FiboIn",213,0.5);
      ObjectSetFiboDescription("FiboIn",3,"(50.0) -  %$");
      ObjectSet("FiboIn",214,0.618);
      ObjectSetFiboDescription("FiboIn",4,"(61.8) -  %$");
      ObjectSet("FiboIn",215,0.764);
      ObjectSetFiboDescription("FiboIn",5,"(76.4) -  %$");
      ObjectSet("FiboIn",216,1.0);
      ObjectSetFiboDescription("FiboIn",6,"Daily HIGH (100.0) -  %$");
      ObjectSet("FiboIn",OBJPROP_RAY,TRUE);
      ObjectSet("FiboIn",OBJPROP_BACK,TRUE);
     }
   else ObjectDelete("FiboIn");
   return (0);
  }