Navigation:Home > Content >

IND_1.mq4

Time: 2017-03-15 | Download file:IND_1.mq4

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Black
#property indicator_color2 Black

int Gi_76 = 7;
double G_ibuf_80[];
double G_ibuf_84[];

// E37F0136AA3FFAF149B351F6A4C948E9
int init() {
   Comment("");
   SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 2);
   SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 2);
   SetIndexBuffer(0, G_ibuf_80);
   SetIndexBuffer(1, G_ibuf_84);
   IndicatorDigits(MarketInfo(Symbol(), MODE_DIGITS));
   SetIndexLabel(0, "");
   SetIndexLabel(1, "");
   SetIndexDrawBegin(0, Gi_76);
   SetIndexDrawBegin(1, Gi_76);
   SetIndexEmptyValue(0, 0.0);
   SetIndexEmptyValue(1, 0.0);
   return (0);
}
			   	 	   						 		 			  			  			   		 		 	 		 	 	  			 	  			 		 			 				 			 			     	 						  		  	     			 	  	 										 		 			   	  		  
// EA2B2676C28C0DB26D39331A336C6B92
int start() {
   int Li_32;
   int Li_36;
   int Li_40;
   double Ld_44;
   double Ld_52;
   double Ld_60;
   double Ld_68;
   double Ld_76;
   double Ld_84;
   double Ld_92;
   double Ld_100;
   double Ld_108;
   double Ld_124;
   double Ld_132;
   double Ld_140;
   double Ld_148;
   double Ld_156;
   double Ld_164;
   double Ld_172;
   double Ld_180;
   double Ld_188;
   double Ld_196;
   double Ld_204;
   double Ld_212;
   double Ld_220;
   double Ld_228;
   double Ld_236;
   double Ld_244;
   int Li_268;
   int Li_272;
   int Li_276;
   double Ld_0 = 1;
   int Li_8 = 0;
   int Li_12 = 500;
   string Ls_16 = "0" + ((Bars - 1)) + "| ";
   IndicatorShortName(Ls_16);
   double Ld_252 = 0;
   double Ld_unused_260 = 0;
   for (int Li_28 = Li_12 - 1; Li_28 >= 0; Li_28--) {
      Ld_76 = 0;
      Ld_212 = 0.0;
      Ld_220 = 0.0;
      for (int Li_24 = Gi_76 - 1; Li_24 >= 0; Li_24--) {
         Ld_84 = 1.0 * (Gi_76 - Li_24) / Gi_76 + 1.0;
         Ld_76 += Ld_84 * (High[Li_24 + Li_28] - (Low[Li_24 + Li_28]));
      }
      Ld_92 = Ld_76 / Gi_76;
      Ld_100 = MathMax(Ld_92, Ld_100);
      if (Li_28 == Li_12 - 1 - Gi_76) Ld_108 = Ld_92;
      Ld_108 = MathMin(Ld_92, Ld_108);
      Li_268 = MathRound(Ld_0 * Ld_108 / Point);
      Li_272 = MathRound(Ld_0 * Ld_100 / Point);
      Li_276 = MathRound(Ld_0 / 2.0 * (Ld_100 + Ld_108) / Point);
      if (Li_8 > 0) {
         Ld_52 = Low[Li_28] + Li_268 * 2 * Point;
         Ld_44 = High[Li_28] - Li_268 * 2 * Point;
         Ld_132 = Low[Li_28] + Li_272 * 2 * Point;
         Ld_124 = High[Li_28] - Li_272 * 2 * Point;
         Ld_164 = Low[Li_28] + Li_276 * 2 * Point;
         Ld_156 = High[Li_28] - Li_276 * 2 * Point;
         if (Close[Li_28] > Ld_68) Li_32 = 1;
         if (Close[Li_28] < Ld_60) Li_32 = -1;
         if (Close[Li_28] > Ld_148) Li_36 = 1;
         if (Close[Li_28] < Ld_140) Li_36 = -1;
         if (Close[Li_28] > Ld_180) Li_40 = 1;
         if (Close[Li_28] < Ld_172) Li_40 = -1;
      }
      if (Li_8 == 0) {
         Ld_52 = Close[Li_28] + Li_268 * 2 * Point;
         Ld_44 = Close[Li_28] - Li_268 * 2 * Point;
         Ld_132 = Close[Li_28] + Li_272 * 2 * Point;
         Ld_124 = Close[Li_28] - Li_272 * 2 * Point;
         Ld_164 = Close[Li_28] + Li_276 * 2 * Point;
         Ld_156 = Close[Li_28] - Li_276 * 2 * Point;
         if (Close[Li_28] > Ld_68) Li_32 = 1;
         if (Close[Li_28] < Ld_60) Li_32 = -1;
         if (Close[Li_28] > Ld_148) Li_36 = 1;
         if (Close[Li_28] < Ld_140) Li_36 = -1;
         if (Close[Li_28] > Ld_180) Li_40 = 1;
         if (Close[Li_28] < Ld_172) Li_40 = -1;
      }
      if (Li_32 > 0 && Ld_44 < Ld_60) Ld_44 = Ld_60;
      if (Li_32 < 0 && Ld_52 > Ld_68) Ld_52 = Ld_68;
      if (Li_36 > 0 && Ld_124 < Ld_140) Ld_124 = Ld_140;
      if (Li_36 < 0 && Ld_132 > Ld_148) Ld_132 = Ld_148;
      if (Li_40 > 0 && Ld_156 < Ld_172) Ld_156 = Ld_172;
      if (Li_40 < 0 && Ld_164 > Ld_180) Ld_164 = Ld_180;
      if (Li_32 > 0) Ld_188 = Ld_44 + Li_268 * Point;
      if (Li_32 < 0) Ld_188 = Ld_52 - Li_268 * Point;
      if (Li_36 > 0) Ld_196 = Ld_124 + Li_272 * Point;
      if (Li_36 < 0) Ld_196 = Ld_132 - Li_272 * Point;
      if (Li_40 > 0) Ld_204 = Ld_156 + Li_276 * Point;
      if (Li_40 < 0) Ld_204 = Ld_164 - Li_276 * Point;
      Ld_228 = Ld_196 - Li_272 * Point;
      Ld_236 = Ld_196 + Li_272 * Point;
      Ld_244 = Ld_236 - Ld_228;
      if (Ld_244 != 0.0) {
         Ld_212 = NormalizeDouble((Ld_188 - Ld_228) / Ld_244, 6);
         Ld_220 = NormalizeDouble((Ld_204 - Ld_228) / Ld_244, 6);
      }
      Ld_252 = Ld_212 - Ld_220;
      if (Ld_252 < 0.0) {
         G_ibuf_80[Li_28] = Ld_252;
         G_ibuf_84[Li_28] = 0;
      } else {
         if (Ld_252 > 0.0) {
            G_ibuf_84[Li_28] = Ld_252;
            G_ibuf_80[Li_28] = 0;
         }
      }
      Ld_60 = Ld_44;
      Ld_68 = Ld_52;
      Ld_140 = Ld_124;
      Ld_148 = Ld_132;
      Ld_172 = Ld_156;
      Ld_180 = Ld_164;
   }
   return (0);
}

Recommend