/*
   Generated by EX4-TO-MQ4 decompiler V4.0.469.1 [-]
   Website: https://purebeam.biz
   E-mail : <PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>
*/
#property copyright "Copyright © 2013, Tehnobyte"
#property link      "http://<PRESIDIO_ANONYMIZED_EMAIL_ADDRESS>/"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 RoyalBlue
#property indicator_color2 Red

extern string note1 = "--------------------------------------------";
extern string note2 = "Arrow Type";
extern string note3 = "0=Thick, 1=Thin, 2=Hollow, 3=Round 4=Fractal";
extern int ArrowType = 2;
extern string ATRPeriod_Settings = "M5=12,M15=12,M30/H1/H4=5";
extern int ATR_Period = 12;
extern int StdDev_MA_Period = 12;
extern int StdDev_MA_Shift = 0;
extern int StdDev_MA_Method = 0;
extern int StdDev_MA_Price = 0;
extern int MA_Fast_Period = 3;
extern int MA_Fast_Method = 2;
extern int MA_Fast_Shift = 0;
extern string Volatility_settings = "M5=0.0003,M15/M30/H1=0.001,H4=0.003";
extern double VolatilityLevel = 0.0003;
extern string Monitor_Periods = "Input in minutes";
extern int HTF1m = 15;
extern int HTF2m = 30;
extern int HTF3m = 60;
extern int HTF4m = 240;
extern bool ShowTargets = TRUE;
extern string CmtMM1 = "Position Size Calculator";
extern bool ShowCalculator = TRUE;
extern string CmtMM2 = "Enter Risk in percentage of account balance/equity";
extern double riskpercent = 3.0;
extern string CmtMM3 = "Use Equity instead Balance";
extern bool equity = TRUE;
extern int Barslimit = 500;
extern string note11 = "--------------------------------------------";
extern string note12 = "turn on Alert = true; turn off = false";
extern bool AlertOn = TRUE;
extern bool MTFAlertOn = FALSE;
extern string note13 = "--------------------------------------------";
extern string note14 = "send Email Alert = true; turn off = false";
extern bool SendAnEmail = FALSE;
extern color Targetcolor = DimGray;
extern int MarketBiasCorner = 1;
string gs_284;
string gs_292;
string gs_300;
string gs_308;
color gi_316;
color gi_320;
color gi_324;
color gi_328;
double gda_332[];
double gda_336[];
double gda_340[];
double gda_344[];
double gda_348[];
int gi_352;
string gs_360;
string gs_368 = "";
datetime gt_376;
int gi_380;
int gi_384;
int gi_388;
int gi_392;
int gi_396;
int gi_400 = 0;
int gi_404 = 0;

string f0_2() {
   string ls_4;
   switch (Period()) {
   case PERIOD_M1:
      ls_4 = "M1";
      break;
   case PERIOD_M5:
      ls_4 = "M5";
      break;
   case PERIOD_M15:
      ls_4 = "M15";
      break;
   case PERIOD_M30:
      ls_4 = "M30";
      break;
   case PERIOD_H1:
      ls_4 = "H1";
      break;
   case PERIOD_H4:
      ls_4 = "H4";
      break;
   case PERIOD_D1:
      ls_4 = "D1";
      break;
   case PERIOD_W1:
      ls_4 = "W1";
      break;
   case PERIOD_MN1:
      ls_4 = "MN1";
      break;
   default:
      ls_4 = Period();
   }
   return (ls_4);
}
	 	     		  		 		  			 			 		 	    	    		  			 	 			  					 			 	 	  				 	  	 					 			  			  		 			   		       		 				 	  		 	 	  	 		  				  
int init() {
   if (ArrowType == 0) {
      SetIndexStyle(0, DRAW_ARROW);
      SetIndexArrow(0, 233);
      SetIndexStyle(1, DRAW_ARROW);
      SetIndexArrow(1, 234);
   } else {
      if (ArrowType == 1) {
         SetIndexStyle(0, DRAW_ARROW);
         SetIndexArrow(0, 225);
         SetIndexStyle(1, DRAW_ARROW);
         SetIndexArrow(1, 226);
      } else {
         if (ArrowType == 2) {
            SetIndexStyle(0, DRAW_ARROW);
            SetIndexArrow(0, SYMBOL_ARROWUP);
            SetIndexStyle(1, DRAW_ARROW);
            SetIndexArrow(1, SYMBOL_ARROWDOWN);
         } else {
            if (ArrowType == 3) {
               SetIndexStyle(0, DRAW_ARROW);
               SetIndexArrow(0, 221);
               SetIndexStyle(1, DRAW_ARROW);
               SetIndexArrow(1, 222);
            } else {
               if (ArrowType == 4) {
                  SetIndexStyle(0, DRAW_ARROW);
                  SetIndexArrow(0, 217);
                  SetIndexStyle(1, DRAW_ARROW);
                  SetIndexArrow(1, 218);
               }
            }
         }
      }
   }
   IndicatorBuffers(5);
   SetIndexBuffer(0, gda_332);
   SetIndexBuffer(1, gda_336);
   SetIndexBuffer(2, gda_340);
   SetIndexBuffer(3, gda_344);
   SetIndexBuffer(4, gda_348);
   gs_360 = Symbol() + " (" + f0_2() + "):  ";
   gs_368 = "fib1" + 0;
   if (ObjectFind("toolbox") != -1) ObjectDelete("toolbox");
   ObjectCreate("toolbox", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("toolbox", "ggg", 50, "Webdings", MidnightBlue);
   ObjectSet("toolbox", OBJPROP_CORNER, MarketBiasCorner);
   ObjectSet("toolbox", OBJPROP_XDISTANCE, 10);
   ObjectSet("toolbox", OBJPROP_YDISTANCE, 15);
   ObjectSet("toolbox", OBJPROP_BACK, TRUE);
   if (ObjectFind("toolboxx") != -1) ObjectDelete("toolboxx");
   ObjectCreate("toolboxx", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("toolboxx", "ggg", 50, "Webdings", MidnightBlue);
   ObjectSet("toolboxx", OBJPROP_CORNER, MarketBiasCorner);
   ObjectSet("toolboxx", OBJPROP_XDISTANCE, 10);
   ObjectSet("toolboxx", OBJPROP_YDISTANCE, 120);
   ObjectSet("toolboxx", OBJPROP_BACK, TRUE);
   if (ObjectFind("tool4box") != -1) ObjectDelete("tool4box");
   ObjectCreate("tool4box", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("tool4box", "¨¨¨¨", 45, "Wingdings", RoyalBlue);
   ObjectSet("tool4box", OBJPROP_CORNER, MarketBiasCorner);
   ObjectSet("tool4box", OBJPROP_XDISTANCE, 4);
   ObjectSet("tool4box", OBJPROP_YDISTANCE, 68);
   ObjectSet("tool4box", OBJPROP_BACK, FALSE);
   return (0);
}
	   	   			  	 		 		 	 					  	   			   			  		 	  	   			 					 				 							 	 		 	  			 		 	  				 	   	  	      						   			 	   		 		 		 		  
int deinit() {
   if (ObjectFind("toolbox") != -1) ObjectDelete("toolbox");
   if (ObjectFind("toolboxx") != -1) ObjectDelete("toolboxx");
   if (ObjectFind("tool4box") != -1) ObjectDelete("tool4box");
   if (ObjectFind("MarketBias") != -1) ObjectDelete("MarketBias");
   if (ObjectFind("trend") != -1) ObjectDelete("trend");
   if (ObjectFind("range") != -1) ObjectDelete("range");
   if (ObjectFind("flat") != -1) ObjectDelete("flat");
   if (ObjectFind("vola") != -1) ObjectDelete("vola");
   if (ObjectFind("RiskPercent") != -1) ObjectDelete("RiskPercent");
   if (ObjectFind("RiskP") != -1) ObjectDelete("RiskP");
   if (ObjectFind("MoneyRisk") != -1) ObjectDelete("MoneyRisk");
   if (ObjectFind("MoneyR") != -1) ObjectDelete("MoneyR");
   if (ObjectFind("Lotsize") != -1) ObjectDelete("Lotsize");
   if (ObjectFind("Lots") != -1) ObjectDelete("Lots");
   return (0);
}
	 	 	 	  	   			   	 			 	 	    	  		 	  	   	    		  		 					 			 		  	 	 		    			   	   	 		  	 	 		 			 	 	 	 				 	  	 		    	 				   	 	  	
int f0_0() {
   datetime lt_0 = Time[0];
   if (gt_376 != lt_0) {
      gt_376 = lt_0;
      return (1);
   }
   return (0);
}
	 	   				  			 	  				 		 		  	   	  				  		 		 			 	 				 	   	 	    		 	   						   	  							 					 		   		  		 	  	 	  	 		 	  		 	  			 	 
int start() {
   int li_4;
   double ld_8;
   double ld_16;
   double ld_28;
   double ld_36;
   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_116;
   double ld_124;
   double ld_132;
   double ld_140;
   double ld_148;
   double ld_156;
   double ld_164;
   double ld_172;
   int li_24 = IndicatorCounted();
   if (li_24 < 0) return (-1);
   if (li_24 > 0) li_24--;
   for (gi_352 = 0; gi_352 < Barslimit; gi_352++) {
      gda_340[gi_352] = iATR(NULL, 0, ATR_Period, gi_352);
      gda_344[gi_352] = iStdDev(NULL, 0, StdDev_MA_Period, StdDev_MA_Shift, StdDev_MA_Method, StdDev_MA_Price, gi_352);
   }
   for (gi_352 = 0; gi_352 < Barslimit; gi_352++) gda_348[gi_352] = iMAOnArray(gda_344, 0, MA_Fast_Period, MA_Fast_Shift, MA_Fast_Method, gi_352);
   if (gda_344[0] > gda_348[0] && gda_344[0] < gda_340[0]) f0_5(1);
   if (gda_344[0] > gda_348[0] && gda_344[0] > gda_340[0]) f0_5(2);
   if (gda_344[0] < gda_348[0] && gda_344[0] > gda_340[0]) f0_5(3);
   if (gda_344[0] < gda_348[0] && gda_344[0] < gda_340[0]) f0_5(4);
   if (gda_340[0] <= VolatilityLevel) f0_5(5);
   if (gda_340[0] > VolatilityLevel) f0_5(6);
   for (int li_0 = 0; li_0 <= Barslimit; li_0++) {
      li_4 = li_0;
      ld_8 = 0;
      ld_16 = 0;
      for (li_4 = li_0; li_4 <= li_0 + 9; li_4++) ld_16 += MathAbs(High[li_4] - Low[li_4]);
      ld_8 = ld_16 / 20.0;
      ld_28 = iATR(NULL, 0, 5, 1);
      ld_36 = iFractals(NULL, 0, MODE_UPPER, li_0 + 2);
      ld_44 = iFractals(NULL, 0, MODE_UPPER, li_0 + 3);
      ld_52 = iFractals(NULL, 0, MODE_LOWER, li_0 + 2);
      ld_60 = iFractals(NULL, 0, MODE_LOWER, li_0 + 3);
      ld_68 = iFractals(NULL, 0, MODE_UPPER, 2);
      ld_76 = iFractals(NULL, 0, MODE_UPPER, 3);
      ld_84 = iFractals(NULL, 0, MODE_UPPER, 4);
      ld_92 = iFractals(NULL, 0, MODE_LOWER, 2);
      ld_100 = iFractals(NULL, 0, MODE_LOWER, 3);
      ld_108 = iFractals(NULL, 0, MODE_LOWER, 4);
      ld_116 = MarketInfo(Symbol(), MODE_ASK) - MarketInfo(Symbol(), MODE_BID);
      f0_8();
      if (f0_4(HTF1m, 1) == 1.0) {
         gs_284 = CharToStr(222);
         gi_316 = Red;
         if (MTFAlertOn && gi_380 != iBars(NULL, HTF1m)) Alert("HFT SELL M" + HTF1m);
         gi_380 = iBars(NULL, HTF1m);
      }
      if (f0_4(HTF1m, 2) == 2.0) {
         gs_284 = CharToStr(221);
         gi_316 = RoyalBlue;
         if (MTFAlertOn && gi_380 != iBars(NULL, HTF1m)) Alert("HFT BUY M" + HTF1m);
         gi_380 = iBars(NULL, HTF1m);
      }
      if (f0_4(HTF2m, 1) == 1.0) {
         gs_292 = CharToStr(222);
         gi_320 = Red;
         if (MTFAlertOn && gi_384 != iBars(NULL, HTF2m)) Alert("HFT SELL M" + HTF2m);
         gi_384 = iBars(NULL, HTF2m);
      }
      if (f0_4(HTF2m, 2) == 2.0) {
         gs_292 = CharToStr(221);
         gi_320 = RoyalBlue;
         if (MTFAlertOn && gi_384 != iBars(NULL, HTF2m)) Alert("HFT BUY M" + HTF2m);
         gi_384 = iBars(NULL, HTF2m);
      }
      if (f0_4(HTF3m, 1) == 1.0) {
         gs_300 = CharToStr(222);
         gi_324 = Red;
         if (MTFAlertOn && gi_388 != iBars(NULL, HTF3m)) Alert("HFT SELL M" + HTF3m);
         gi_388 = iBars(NULL, HTF3m);
      }
      if (f0_4(HTF3m, 2) == 2.0) {
         gs_300 = CharToStr(221);
         gi_324 = RoyalBlue;
         if (MTFAlertOn && gi_388 != iBars(NULL, HTF3m)) Alert("HFT BUY M" + HTF3m);
         gi_388 = iBars(NULL, HTF3m);
      }
      if (f0_4(HTF4m, 1) == 1.0) {
         gs_308 = CharToStr(222);
         gi_328 = Red;
         if (MTFAlertOn && gi_392 != iBars(NULL, HTF4m)) Alert("HFT SELL M" + HTF4m);
         gi_392 = iBars(NULL, HTF4m);
      }
      if (f0_4(HTF4m, 2) == 2.0) {
         gs_308 = CharToStr(221);
         gi_328 = RoyalBlue;
         if (MTFAlertOn && gi_392 != iBars(NULL, HTF4m)) Alert("HFT BUY M" + HTF4m);
         gi_392 = iBars(NULL, HTF4m);
      }
      if (f0_0())
         if (ObjectFind("bigcandle") != -1) ObjectDelete("bigcandle");
      if ((ld_92 > 0.0 && High[0] > High[1]) || (ld_100 > 0.0 && High[0] > High[1] && High[1] <= High[2])) {
         if (ld_92 > 0.0) {
            ld_124 = ld_92 - 20.0 * Point;
            ld_132 = High[1] + (High[1] - ld_92) / 2.0;
            ld_140 = High[1] + (High[1] - ld_92);
            ld_148 = High[1] + 3.236 * (High[1] - ld_92);
            ld_156 = High[1] - ld_92 + ld_116 + 20.0 * Point;
         } else {
            if (ld_100 > 0.0 && High[0] > High[1] && High[1] <= High[2]) {
               ld_124 = ld_100 - 20.0 * Point;
               ld_132 = High[1] + (High[1] - ld_100) / 2.0;
               ld_140 = High[1] + (High[1] - ld_100);
               ld_148 = High[1] + 3.236 * (High[1] - ld_100);
               ld_156 = High[1] - ld_100 + ld_116 + 20.0 * Point;
            }
         }
         if (AlertOn && gi_396 != Bars) {
            Alert(gs_360 + "HFT BUY ", "; Entry ", Bid, " SL " + DoubleToStr(ld_124, 5), " TP1 " + DoubleToStr(ld_132, 5), " TP2 " + DoubleToStr(ld_140, 5), " TP3 " + DoubleToStr(ld_148,
               5));
            if (SendAnEmail) {
               SendMail(Symbol() + f0_2(), "HFT BUY; Entry " + DoubleToStr(Bid, 5) + " SL " + DoubleToStr(ld_124, 5) + " TP1 " + DoubleToStr(ld_132, 5) + " TP2 " + DoubleToStr(ld_140,
                  5) + " TP3 " + DoubleToStr(ld_148, 5));
            }
            gi_396 = Bars;
         }
         if (ShowTargets) f0_3(1);
         if (High[1] - Low[1] > 1.5 * ld_28) f0_9();
      }
      if ((ld_52 > 0.0 && High[li_0] > High[li_0 + 1]) || (ld_60 > 0.0 && High[li_0] > High[li_0 + 1] && High[li_0 + 1] <= High[li_0 + 2])) gda_332[li_0] = Low[li_0] - ld_8;
      if ((ld_68 > 0.0 && Low[0] < Low[1]) || (ld_76 > 0.0 && Low[0] < Low[1] && Low[1] >= Low[2])) {
         if (ld_68 > 0.0 && Low[0] < Low[1]) {
            ld_124 = ld_68 + 20.0 * Point;
            ld_132 = Low[1] - (ld_68 - Low[1]) / 2.0;
            ld_140 = Low[1] - (ld_68 - Low[1]);
            ld_148 = Low[1] - 3.236 * (ld_68 - Low[1]);
            ld_156 = ld_68 - Low[1] + ld_116 + 20.0 * Point;
         } else {
            if (ld_76 > 0.0 && Low[0] < Low[1] && Low[1] >= Low[2]) {
               ld_124 = ld_76 + 20.0 * Point;
               ld_132 = Low[1] - (ld_76 - Low[1]) / 2.0;
               ld_140 = Low[1] - (ld_76 - Low[1]);
               ld_148 = Low[1] - 3.236 * (ld_76 - Low[1]);
               ld_156 = ld_76 - Low[1] + ld_116 + 20.0 * Point;
            }
         }
         if (AlertOn && gi_396 != Bars) {
            Alert(gs_360 + "HFT SELL ", "; Entry ", Bid, " SL " + DoubleToStr(ld_124, 5), " TP1 " + DoubleToStr(ld_132, 5), " TP2 " + DoubleToStr(ld_140, 5), " TP3 " + DoubleToStr(ld_148,
               5));
            if (SendAnEmail) {
               SendMail(Symbol() + f0_2(), "HFT SELL; Entry " + DoubleToStr(Bid, 5) + " SL " + DoubleToStr(ld_124, 5) + " TP1 " + DoubleToStr(ld_132, 5) + " TP2 " + DoubleToStr(ld_140,
                  5) + " TP3 " + DoubleToStr(ld_148, 5));
            }
            gi_396 = Bars;
         }
         if (ShowTargets) f0_3(2);
         if (High[1] - Low[1] > 1.5 * ld_28) f0_9();
      }
      if ((ld_36 > 0.0 && Low[li_0] < Low[li_0 + 1]) || (ld_44 > 0.0 && Low[li_0] < Low[li_0 + 1] && Low[li_0 + 1] >= Low[li_0 + 2])) gda_336[li_0] = High[li_0] + ld_8;
   }
   if (equity) ld_164 = AccountEquity();
   else ld_164 = AccountBalance();
   if (ld_156 != 0.0) ld_172 = ld_164 * riskpercent / 100.0 / (ld_156 / Point);
   double ld_180 = ld_164 * riskpercent / 100.0;
   if (ShowCalculator == TRUE) {
      if (ObjectFind("RiskPercent") != -1) ObjectDelete("RiskPercent");
      ObjectCreate("RiskPercent", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("RiskPercent", " " + DoubleToStr(riskpercent, 1) + "%", 8, "Verdana", PaleTurquoise);
      ObjectSet("RiskPercent", OBJPROP_CORNER, MarketBiasCorner);
      ObjectSet("RiskPercent", OBJPROP_XDISTANCE, 20);
      ObjectSet("RiskPercent", OBJPROP_YDISTANCE, 130);
      if (ObjectFind("MoneyRisk") != -1) ObjectDelete("MoneyRisk");
      ObjectCreate("MoneyRisk", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("MoneyRisk", " " + DoubleToStr(ld_180, 2) + "", 8, "Verdana", PaleTurquoise);
      ObjectSet("MoneyRisk", OBJPROP_CORNER, MarketBiasCorner);
      ObjectSet("MoneyRisk", OBJPROP_XDISTANCE, 20);
      ObjectSet("MoneyRisk", OBJPROP_YDISTANCE, 140);
      if (ObjectFind("Lotsize") != -1) ObjectDelete("Lotsize");
      ObjectCreate("Lotsize", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("Lotsize", "" + DoubleToStr(ld_172, 2) + "", 8, "Verdana", PaleTurquoise);
      ObjectSet("Lotsize", OBJPROP_CORNER, MarketBiasCorner);
      ObjectSet("Lotsize", OBJPROP_XDISTANCE, 20);
      ObjectSet("Lotsize", OBJPROP_YDISTANCE, 150);
      if (ObjectFind("RiskP") != -1) ObjectDelete("RiskP");
      ObjectCreate("RiskP", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("RiskP", "RISK PERCENT", 8, "Verdana", PaleTurquoise);
      ObjectSet("RiskP", OBJPROP_CORNER, MarketBiasCorner);
      ObjectSet("RiskP", OBJPROP_XDISTANCE, 100);
      ObjectSet("RiskP", OBJPROP_YDISTANCE, 130);
      if (ObjectFind("MoneyR") != -1) ObjectDelete("MoneyR");
      ObjectCreate("MoneyR", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("MoneyR", "MONEY RISK", 8, "Verdana", PaleTurquoise);
      ObjectSet("MoneyR", OBJPROP_CORNER, MarketBiasCorner);
      ObjectSet("MoneyR", OBJPROP_XDISTANCE, 100);
      ObjectSet("MoneyR", OBJPROP_YDISTANCE, 140);
      if (ObjectFind("Lots") != -1) ObjectDelete("Lots");
      ObjectCreate("Lots", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("Lots", "POSITION SIZE", 8, "Verdana", PaleTurquoise);
      ObjectSet("Lots", OBJPROP_CORNER, MarketBiasCorner);
      ObjectSet("Lots", OBJPROP_XDISTANCE, 100);
      ObjectSet("Lots", OBJPROP_YDISTANCE, 150);
   }
   return (0);
}
	 		  	  	 					    				 	  	   	     	  	 			    	 	 		 		  	 			     	 	       		 	  	    			  	  			 				  	 	 	  	 	  		 	    		 			    		  	
void f0_5(int ai_0) {
   if (ObjectFind("MarketBias") != -1) ObjectDelete("MarketBias");
   ObjectCreate("MarketBias", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("MarketBias", "HFT MARKET BIAS ", 10, "Verdana Bold", PaleTurquoise);
   ObjectSet("MarketBias", OBJPROP_CORNER, MarketBiasCorner);
   ObjectSet("MarketBias", OBJPROP_XDISTANCE, 42);
   ObjectSet("MarketBias", OBJPROP_YDISTANCE, 20);
   if (ObjectFind("trend") != -1) ObjectDelete("trend");
   ObjectCreate("trend", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("trend", "TREND", 9, "Verdana Bold", PaleTurquoise);
   ObjectSet("trend", OBJPROP_CORNER, MarketBiasCorner);
   ObjectSet("trend", OBJPROP_XDISTANCE, 140);
   ObjectSet("trend", OBJPROP_YDISTANCE, 40);
   if (ObjectFind("vola") != -1) ObjectDelete("vola");
   ObjectCreate("vola", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("vola", "VOLATILITY  ", 9, "Verdana Bold", PaleTurquoise);
   ObjectSet("vola", OBJPROP_CORNER, MarketBiasCorner);
   ObjectSet("vola", OBJPROP_XDISTANCE, 10);
   ObjectSet("vola", OBJPROP_YDISTANCE, 40);
   if (ai_0 == 1) {
      if (ObjectFind("range") != -1) ObjectDelete("range");
      ObjectCreate("range", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("range", "   WEAK   ", 8, "Verdana", DodgerBlue);
      ObjectSet("range", OBJPROP_CORNER, MarketBiasCorner);
      ObjectSet("range", OBJPROP_XDISTANCE, 130);
      ObjectSet("range", OBJPROP_YDISTANCE, 60);
   }
   if (ai_0 == 2) {
      if (ObjectFind("range") != -1) ObjectDelete("range");
      ObjectCreate("range", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("range", "  SOLID  ", 8, "Verdana", DodgerBlue);
      ObjectSet("range", OBJPROP_CORNER, MarketBiasCorner);
      ObjectSet("range", OBJPROP_XDISTANCE, 130);
      ObjectSet("range", OBJPROP_YDISTANCE, 60);
   }
   if (ai_0 == 3) {
      if (ObjectFind("range") != -1) ObjectDelete("range");
      ObjectCreate("range", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("range", "EXHAUSTING", 8, "Verdana", Orange);
      ObjectSet("range", OBJPROP_CORNER, MarketBiasCorner);
      ObjectSet("range", OBJPROP_XDISTANCE, 130);
      ObjectSet("range", OBJPROP_YDISTANCE, 60);
   }
   if (ai_0 == 4) {
      if (ObjectFind("range") != -1) ObjectDelete("range");
      ObjectCreate("range", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("range", "  RANGE  ", 8, "Verdana", Yellow);
      ObjectSet("range", OBJPROP_CORNER, MarketBiasCorner);
      ObjectSet("range", OBJPROP_XDISTANCE, 130);
      ObjectSet("range", OBJPROP_YDISTANCE, 60);
   }
   if (ai_0 == 5) {
      if (ObjectFind("flat") != -1) ObjectDelete("flat");
      ObjectCreate("flat", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("flat", "LOW   ", 8, "Verdana", Red);
      ObjectSet("flat", OBJPROP_CORNER, MarketBiasCorner);
      ObjectSet("flat", OBJPROP_XDISTANCE, 30);
      ObjectSet("flat", OBJPROP_YDISTANCE, 60);
   }
   if (ai_0 == 6) {
      if (ObjectFind("flat") != -1) ObjectDelete("flat");
      ObjectCreate("flat", OBJ_LABEL, 0, 0, 0);
      ObjectSetText("flat", "GOOD ", 8, "Verdana", DodgerBlue);
      ObjectSet("flat", OBJPROP_CORNER, MarketBiasCorner);
      ObjectSet("flat", OBJPROP_XDISTANCE, 40);
      ObjectSet("flat", OBJPROP_YDISTANCE, 60);
   }
}
	   	 		 		  		   		 		  			   		 			 		 		  	 	   	  	  	 			  					    				  	 	 	      		 			 			 					  	 			  			      		 	    			   		 	 		
void f0_8() {
   if (ObjectFind("Trade00") != -1) ObjectDelete("Trade00");
   if (ObjectFind("Trade0") != -1) ObjectDelete("Trade0");
   if (ObjectFind("Trade11") != -1) ObjectDelete("Trade11");
   if (ObjectFind("Trade1") != -1) ObjectDelete("Trade1");
   if (ObjectFind("Trade22") != -1) ObjectDelete("Trade22");
   if (ObjectFind("Trade2") != -1) ObjectDelete("Trade2");
   if (ObjectFind("Trade33") != -1) ObjectDelete("Trade33");
   if (ObjectFind("Trade3") != -1) ObjectDelete("Trade3");
   ObjectCreate("Trade00", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Trade00", f0_1(HTF1m), 8, "Verdana", PaleTurquoise);
   ObjectSet("Trade00", OBJPROP_CORNER, MarketBiasCorner);
   ObjectSet("Trade00", OBJPROP_XDISTANCE, 177);
   ObjectSet("Trade00", OBJPROP_YDISTANCE, 85);
   ObjectCreate("Trade0", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Trade0", gs_284, 15, "Wingdings", gi_316);
   ObjectSet("Trade0", OBJPROP_CORNER, MarketBiasCorner);
   ObjectSet("Trade0", OBJPROP_XDISTANCE, 180);
   ObjectSet("Trade0", OBJPROP_YDISTANCE, 96);
   ObjectCreate("Trade11", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Trade11", f0_1(HTF2m), 8, "Verdana", PaleTurquoise);
   ObjectSet("Trade11", OBJPROP_CORNER, MarketBiasCorner);
   ObjectSet("Trade11", OBJPROP_XDISTANCE, 125);
   ObjectSet("Trade11", OBJPROP_YDISTANCE, 85);
   ObjectCreate("Trade1", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Trade1", gs_292, 15, "Wingdings", gi_320);
   ObjectSet("Trade1", OBJPROP_CORNER, MarketBiasCorner);
   ObjectSet("Trade1", OBJPROP_XDISTANCE, 127);
   ObjectSet("Trade1", OBJPROP_YDISTANCE, 96);
   ObjectCreate("Trade22", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Trade22", f0_1(HTF3m), 8, "Verdana", PaleTurquoise);
   ObjectSet("Trade22", OBJPROP_CORNER, MarketBiasCorner);
   ObjectSet("Trade22", OBJPROP_XDISTANCE, 75);
   ObjectSet("Trade22", OBJPROP_YDISTANCE, 85);
   ObjectCreate("Trade2", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Trade2", gs_300, 15, "Wingdings", gi_324);
   ObjectSet("Trade2", OBJPROP_CORNER, MarketBiasCorner);
   ObjectSet("Trade2", OBJPROP_XDISTANCE, 74);
   ObjectSet("Trade2", OBJPROP_YDISTANCE, 96);
   ObjectCreate("Trade33", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Trade33", f0_1(HTF4m), 8, "Verdana", PaleTurquoise);
   ObjectSet("Trade33", OBJPROP_CORNER, MarketBiasCorner);
   ObjectSet("Trade33", OBJPROP_XDISTANCE, 22);
   ObjectSet("Trade33", OBJPROP_YDISTANCE, 85);
   ObjectCreate("Trade3", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("Trade3", gs_308, 15, "Wingdings", gi_328);
   ObjectSet("Trade3", OBJPROP_CORNER, MarketBiasCorner);
   ObjectSet("Trade3", OBJPROP_XDISTANCE, 22);
   ObjectSet("Trade3", OBJPROP_YDISTANCE, 96);
}
	  			 					    	 	     			  			  	 		 					  			    	  		  	 	  		 			 			 						   		 	 	    				    	 	 			 	    	 	 	  		 			  		   	 	   		 
string f0_1(int ai_0) {
   string ls_4;
   if (ai_0 == 60) ls_4 = "H1";
   if (ai_0 == 240) ls_4 = "H4";
   if (ai_0 == 1440) ls_4 = "D1";
   if (ai_0 == 10080) ls_4 = "W1";
   if (ai_0 == 43200) ls_4 = "MN1";
   if (ai_0 == 15 || ai_0 == 30) ls_4 = "M" + ai_0;
   if (ai_0 == 1 || ai_0 == 5) ls_4 = "M" + ai_0 + " ";
   return (ls_4);
}
	       			 		 		 				 						 	   		    			 			 	  		  			 	 			 			  						  	 		 		 			 				  						   	         	 				    		 	    	 		 					  
void f0_9() {
   if (ObjectFind("bigcandle") != -1) ObjectDelete("bigcandle");
   ObjectCreate("bigcandle", OBJ_LABEL, 0, 0, 0);
   ObjectSetText("bigcandle", "WARNING! BSC ", 9, "Verdana", Red);
   ObjectSet("bigcandle", OBJPROP_CORNER, MarketBiasCorner);
   ObjectSet("bigcandle", OBJPROP_XDISTANCE, 20);
   ObjectSet("bigcandle", OBJPROP_YDISTANCE, 170);
}
	 		   			 			  	   		  		  	 		       			 						 	 	   			  		  	    	 		    					 	 	 	   		 			  		 	 			   	  	  		 	 		 				 		 	  	   				 
void f0_3(int ai_0) {
   double ld_4 = -0.5;
   double ld_12 = -1.0;
   double ld_20 = -3.236;
   double ld_28 = 1.118;
   double ld_36 = iATR(NULL, 0, 21, 0);
   double ld_44 = 0.0;
   double ld_52 = 0.0;
   double ld_60 = 0.0;
   double ld_68 = 0.0;
   if (ai_0 == 1) {
      gi_400 = iTime(Symbol(), 0, 2);
      gi_404 = iTime(Symbol(), 0, 1);
      ld_44 = f0_6(0);
      ld_52 = High[1];
   }
   if (ai_0 == 2) {
      gi_400 = iTime(Symbol(), 0, 2);
      gi_404 = iTime(Symbol(), 0, 1);
      ld_44 = f0_7(0);
      ld_52 = Low[1];
   }
   ObjectDelete(gs_368);
   ObjectCreate(gs_368, OBJ_FIBO, 0, gi_400, ld_44, gi_404, ld_52);
   ObjectSet(gs_368, OBJPROP_LEVELCOLOR, Targetcolor);
   ObjectSet(gs_368, OBJPROP_COLOR, Black);
   ObjectSet(gs_368, OBJPROP_LEVELWIDTH, 1);
   ObjectSet(gs_368, OBJPROP_FIBOLEVELS, 5);
   ObjectSet(gs_368, OBJPROP_FIRSTLEVEL, ld_4);
   ObjectSetFiboDescription(gs_368, 0, "Target 1 -  %$");
   ObjectSet(gs_368, 211, ld_12);
   ObjectSetFiboDescription(gs_368, 1, "Target 2 -  %$");
   ObjectSet(gs_368, 212, ld_20);
   ObjectSetFiboDescription(gs_368, 2, "Target 3 -  %$");
   ObjectSet(gs_368, 214, 0);
   ObjectSetFiboDescription(gs_368, 4, "Entry -  %$");
   ObjectSet(gs_368, 213, ld_28);
   ObjectSetFiboDescription(gs_368, 3, "Stop Loss -  %$");
   ObjectSet(gs_368, OBJPROP_RAY, FALSE);
   ObjectSet(gs_368, OBJPROP_BACK, TRUE);
}
	 	  		 		  	 			  		 				 			     	 		 		  	   	 										   	 	 	 	 			 	 	  						 		  		 	 		 		 	  		  		   		   		 	     	 	   			  		    
double f0_7(int ai_0) {
   double ld_4 = 0.0;
   double ld_12 = 0.0;
   for (int li_20 = 1; li_20 < Bars; li_20++) {
      ld_12 = iFractals(NULL, ai_0, MODE_UPPER, li_20);
      if (ld_12 > 0.0) {
         ld_4 = ld_12;
         break;
      }
   }
   return (ld_4);
}
				 		 	  		 				  	 			   		   	   		 	  		   			 					 	    	     	 		    	  	 	 		 			  	 	 	   	 	   		 		  		    					    				  				  	    
double f0_6(int ai_0) {
   double ld_4 = 0.0;
   double ld_12 = 0.0;
   for (int li_20 = 1; li_20 < Bars; li_20++) {
      ld_12 = iFractals(NULL, ai_0, MODE_LOWER, li_20);
      if (ld_12 > 0.0) {
         ld_4 = ld_12;
         break;
      }
   }
   return (ld_4);
}
		   			  	 	 	  				 	   				 					 			  	 	  	 	 				    	    	 		 	    		 	 	   			   				 		  			 			    					 	     	     	 	    	  				  		
double f0_4(int ai_0, int ai_4) {
   int li_8 = 0.0;
   for (int li_12 = 0; li_12 < 100; li_12++) {
      if (ai_4 == 1) {
         if (!((iFractals(NULL, ai_0, MODE_UPPER, li_12 + 2) > 0.0 && iLow(NULL, ai_0, li_12) < iLow(NULL, ai_0, li_12 + 1)) || (iFractals(NULL, ai_0, MODE_UPPER, li_12 + 3) > 0.0 &&
            iLow(NULL, ai_0, li_12) < iLow(NULL, ai_0, li_12 + 1) && iLow(NULL, ai_0, li_12 + 1) >= iLow(NULL, ai_0, li_12 + 2)))) break;
         li_8 = 1;
         break;
      }
   }
   for (int li_16 = 0; li_16 < 100; li_16++) {
      if (ai_4 == 2) {
         if (!((iFractals(NULL, ai_0, MODE_LOWER, li_16 + 2) > 0.0 && iHigh(NULL, ai_0, li_16) > iHigh(NULL, ai_0, li_16 + 1)) || (iFractals(NULL, ai_0, MODE_LOWER, li_16 +
            3) > 0.0 && iHigh(NULL, ai_0, li_16) > iHigh(NULL, ai_0, li_16 + 1) && iHigh(NULL, ai_0, li_16 + 1) <= iHigh(NULL, ai_0, li_16 + 2)))) break;
         li_8 = 2;
         break;
      }
   }
   return (li_8);
}


non capisco se è un EA oppure un indicatore mt4