

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Black

#include <stdlib.mqh>

int g_period_76 = 1;
int g_ma_method_80 = MODE_SMA;
int g_applied_price_84 = PRICE_CLOSE;
int gi_88 = 0;
int g_period_92 = 5;
int g_ma_method_96 = MODE_SMA;
int g_applied_price_100 = PRICE_CLOSE;
int gi_104 = 0;
bool gi_108 = TRUE;
bool gi_unused_112 = FALSE;
int g_corner_116 = 1;
bool gi_120 = TRUE;
extern int Shift_Y = -20;
extern int Shift_X = 0;
extern int window = 0;
bool gi_unused_136 = TRUE;
bool gi_unused_140 = FALSE;
int gi_unused_144 = 1644825;
bool gi_unused_148 = FALSE;
extern string Colors_Price = "Colors for Price";
extern color Price_color_Up = DodgerBlue;
extern color Price_color_Dn = Red;
extern color Price_color_Dn1 = Gold;
extern color Price_color_Nt = Silver;
extern color Price_color_Hi = Silver;
extern color Price_color_Lo = Silver;
extern string Colors_Data = "Colors for Data";
extern color Highest_Color = Blue;
extern color Lowest_Color = Red;
extern color Warna_D1 = Red;
extern color Warna_Av = Red;
extern color SymbolColor = Red;
extern color LineColor = DarkGray;
extern bool Show_Symbol = TRUE;
int gi_unused_220 = 1;
double gd_296;
double gd_312;
string gs_dummy_416;
string gs_dummy_424;
string g_dbl2str_432;
string g_dbl2str_440;
string gs_unused_448 = "‡";
string gs_unused_456 = "ˆ";
string gs_unused_464 = "n";
string gs_dummy_472;
string gs_unused_480;
string gs_unused_488 = "";
string gs_unused_496 = "";
int g_color_504;
string gs_unused_508 = "";
string gs_516 = "";
string gs_unused_524 = "";
string gs_unused_532 = "";
string gs_unused_540 = "";
string gs_548 = "";
string gs_unused_556 = "";
string gs_unused_564 = "";
double g_ima_572;
double gd_580;
double gd_612;
double gd_620;
double gd_628;
int gi_724;
int gi_736;
int gi_740;
int gi_764;
int gi_768;
int gi_772;
int gi_776;
int gi_780;
int gi_784;
string g_dbl2str_788 = "";
string gs_unused_796 = "";
string gs_unused_804 = "";

int init() {
   return (0);
}

int deinit() {
   string l_name_4;
   ObjectsDeleteAll(0, OBJ_LABEL);
   Print("shutdown error - ", ErrorDescription(GetLastError()));
   for (int li_0 = ObjectsTotal() - 1; li_0 >= 0; li_0--) {
      l_name_4 = ObjectName(li_0);
      if (StringSubstr(l_name_4, 0, 4) == "MP14") ObjectDelete(l_name_4);
   }
   return (0);
}

int start() {
   int li_0;
   double l_digits_32;
   double ld_40;
   double ld_48;
   string ls_56;
   double ld_64;
   string ls_4 = "";
   string ls_unused_12 = "";
   if (Symbol() == "AUDCADm" || Symbol() == "AUDCAD." || Symbol() == "AUDCAD") {
      ls_4 = "AUDCAD";
      li_0 = 6;
   } else {
      if (Symbol() == "AUDCHFm" || Symbol() == "AUDCHF." || Symbol() == "AUDCHF") {
         ls_4 = "AUDCHF";
         li_0 = 6;
      } else {
         if (Symbol() == "AUDJPYm" || Symbol() == "AUDJPY." || Symbol() == "AUDJPY") {
            ls_4 = "AUDJPY";
            li_0 = 5;
         } else {
            if (Symbol() == "AUDNZDm" || Symbol() == "AUDNZD." || Symbol() == "AUDNZD") {
               ls_4 = "AUDNZD";
               li_0 = 6;
            } else {
               if (Symbol() == "AUDUSDm" || Symbol() == "AUDUSD." || Symbol() == "AUDUSD") {
                  ls_4 = "AUDUSD";
                  li_0 = 5;
               } else {
                  if (Symbol() == "CHFJPYm" || Symbol() == "CHFJPY." || Symbol() == "CHFJPY") {
                     ls_4 = "CHFJPY";
                     li_0 = 5;
                  } else {
                     if (Symbol() == "EURAUDm" || Symbol() == "EURAUD." || Symbol() == "EURAUD") {
                        ls_4 = "EURAUD";
                        li_0 = 6;
                     } else {
                        if (Symbol() == "EURCADm" || Symbol() == "EURCAD." || Symbol() == "EURCAD") {
                           ls_4 = "EURCAD";
                           li_0 = 7;
                        } else {
                           if (Symbol() == "EURCHFm" || Symbol() == "EURCHF." || Symbol() == "EURCHF") {
                              ls_4 = "EURCHF";
                              li_0 = 6;
                           } else {
                              if (Symbol() == "EURGBPm" || Symbol() == "EURGBP." || Symbol() == "EURGBP") {
                                 ls_4 = "EURGBP";
                                 li_0 = 6;
                              } else {
                                 if (Symbol() == "EURJPYm" || Symbol() == "EURJPY." || Symbol() == "EURJPY") {
                                    ls_4 = "EURJPY";
                                    li_0 = 6;
                                 } else {
                                    if (Symbol() == "EURUSDm" || Symbol() == "EURUSD." || Symbol() == "EURUSD") {
                                       ls_4 = "EURUSD";
                                       li_0 = 5;
                                    } else {
                                       if (Symbol() == "GBPCHFm" || Symbol() == "GBPCHF." || Symbol() == "GBPCHF") {
                                          ls_4 = "GBPCHF";
                                          li_0 = 11;
                                       } else {
                                          if (Symbol() == "GBPCADm" || Symbol() == "GBPCAD." || Symbol() == "GBPCAD") {
                                             ls_4 = "GBPCAD";
                                             li_0 = 14;
                                          } else {
                                             if (Symbol() == "GBPJPYm" || Symbol() == "GBPJPY." || Symbol() == "GBPJPY") {
                                                ls_4 = "GBPJPY";
                                                li_0 = 11;
                                             } else {
                                                if (Symbol() == "GBPUSDm" || Symbol() == "GBPUSD." || Symbol() == "GBPUSD") {
                                                   ls_4 = "GBPUSD";
                                                   li_0 = 5;
                                                } else {
                                                   if (Symbol() == "NZDCADm" || Symbol() == "NZDCAD." || Symbol() == "NZDCAD") {
                                                      ls_4 = "NZDCAD";
                                                      li_0 = 9;
                                                   } else {
                                                      if (Symbol() == "NZDCHFm" || Symbol() == "NZDCHF." || Symbol() == "NZDCHF") {
                                                         ls_4 = "NZDCHF";
                                                         li_0 = 9;
                                                      } else {
                                                         if (Symbol() == "NZDJPYm" || Symbol() == "NZDJPY." || Symbol() == "NZDJPY") {
                                                            ls_4 = "NZDJPY";
                                                            li_0 = 9;
                                                         } else {
                                                            if (Symbol() == "NZDUSDm" || Symbol() == "NZDUSD." || Symbol() == "NZDUSD") {
                                                               ls_4 = "NZDUSD";
                                                               li_0 = 7;
                                                            } else {
                                                               if (Symbol() == "USDCHFm" || Symbol() == "USDCHF." || Symbol() == "USDCHF") {
                                                                  ls_4 = "USDCHF";
                                                                  li_0 = 5;
                                                               } else {
                                                                  if (Symbol() == "USDJPYm" || Symbol() == "USDJPY." || Symbol() == "USDJPY") {
                                                                     ls_4 = "USDJPY";
                                                                     li_0 = 5;
                                                                  } else {
                                                                     if (Symbol() == "USDCADm" || Symbol() == "USDCAD." || Symbol() == "USDCAD") {
                                                                        ls_4 = "USDCAD";
                                                                        li_0 = 6;
                                                                     } else ls_4 = Symbol();
                                                                  }
                                                               }
                                                            }
                                                         }
                                                      }
                                                   }
                                                }
                                             }
                                          }
                                       }
                                    }
                                 }
                              }
                           }
                        }
                     }
                  }
               }
            }
         }
      }
   }
   string l_time2str_20 = TimeToStr(TimeCurrent(), Digits);
   SERVER2("SM2", 15, 14, 3);
   ObjectSetText("SM2", " " + l_time2str_20 + "", 12, "Arial Bold", Highest_Color);
   int l_ind_counted_28 = IndicatorCounted();
   gd_628 = Period();
   if (gd_628 == 1.0) gs_unused_480 = "M1";
   else {
      if (gd_628 == 5.0) gs_unused_480 = "M5";
      else {
         if (gd_628 == 15.0) gs_unused_480 = "M15";
         else {
            if (gd_628 == 30.0) gs_unused_480 = "M30";
            else {
               if (gd_628 == 60.0) gs_unused_480 = "H1";
               else {
                  if (gd_628 == 240.0) gs_unused_480 = "H4";
                  else {
                     if (gd_628 == 1440.0) gs_unused_480 = "D1";
                     else {
                        if (gd_628 == 43200.0) gs_unused_480 = "MN1";
                        else gs_unused_480 = "-";
                     }
                  }
               }
            }
         }
      }
   }
   if (gi_108 == TRUE) {
      gd_296 = 10;
      gd_312 = 50;
      gd_580 = 10;
      if (Digits == 5 || Digits == 3) l_digits_32 = Digits - 1;
      else l_digits_32 = Digits;
      if (Point == 0.001 || Point == 0.00001) {
         ld_40 = 10.0 * Point;
         ld_48 = 0.1;
      } else {
         ld_40 = Point;
         ld_48 = 1;
      }
      g_ima_572 = iMA(Symbol(), 0, 1, 0, MODE_EMA, PRICE_CLOSE, 0);
      gs_548 = DoubleToStr(g_ima_572, l_digits_32);
      gs_516 = "Footlight MT Light";
      gi_736 = 19;
      gi_740 = 7;
      gd_612 = iMA(Symbol(), PERIOD_M5, g_period_76, gi_88, g_ma_method_80, g_applied_price_84, 0);
      gd_620 = iMA(Symbol(), PERIOD_M5, g_period_92, gi_104, g_ma_method_96, g_applied_price_100, 0);
      gi_724 = CheckWarna(gd_620, gd_612, Price_color_Up, Price_color_Dn);
      Write("MP01", gi_120, Shift_X + gd_296, Shift_Y + gd_312 + 0.0 * gd_580 - 18.0, gs_548, gi_736, gs_516, gi_724);
      Write("MP0111", gi_120, Shift_X + gd_296, Shift_Y + gd_312 + 0.0 * gd_580, "_______________", gi_740, gs_516, LineColor);
      gs_516 = "Tahoma Bold";
      gi_736 = 10;
      gd_612 = iHigh(NULL, PERIOD_D1, 0);
      gs_548 = DoubleToStr(gd_612, l_digits_32);
      Write("MP02", gi_120, Shift_X + gd_296, Shift_Y + gd_312 + 1.0 * gd_580, gs_548, gi_740, gs_516, Price_color_Hi);
      Write("MP0211", gi_120, Shift_X + gd_296 + 40.0, Shift_Y + gd_312 + 1.0 * gd_580, "High : ", gi_740, gs_516, Price_color_Hi);
      gd_620 = iLow(NULL, PERIOD_D1, 0);
      gs_548 = DoubleToStr(gd_620, l_digits_32);
      Write("MP03", gi_120, Shift_X + gd_296, Shift_Y + gd_312 + 2.0 * gd_580, gs_548, gi_740, gs_516, Price_color_Lo);
      Write("MP0311", gi_120, Shift_X + gd_296 + 40.0, Shift_Y + gd_312 + 2.0 * gd_580, "Low : ", gi_740, gs_516, Price_color_Lo);
      gs_548 = DoubleToStr((gd_612 - gd_620) / ld_40, 0);
      Write("MP06", gi_120, Shift_X + gd_296, Shift_Y + gd_312 + 3.0 * gd_580, gs_548, gi_740, gs_516, Price_color_Up);
      Write("MP0611", gi_120, Shift_X + gd_296 + 40.0, Shift_Y + gd_312 + 3.0 * gd_580, "D1 : ", gi_740, gs_516, Price_color_Up);
      gi_764 = 0;
      gi_768 = 0;
      gi_772 = 0;
      gi_776 = 0;
      gi_780 = 0;
      gi_784 = 0;
      gi_764 = (iHigh(NULL, PERIOD_D1, 1) - iLow(NULL, PERIOD_D1, 1)) / ld_40;
      for (gi_784 = 1; gi_784 <= 5; gi_784++) gi_768 = gi_768 + (iHigh(NULL, PERIOD_D1, gi_784) - iLow(NULL, PERIOD_D1, gi_784)) / ld_40;
      for (gi_784 = 1; gi_784 <= 10; gi_784++) gi_772 = gi_772 + (iHigh(NULL, PERIOD_D1, gi_784) - iLow(NULL, PERIOD_D1, gi_784)) / ld_40;
      for (gi_784 = 1; gi_784 <= 20; gi_784++) gi_776 = gi_776 + (iHigh(NULL, PERIOD_D1, gi_784) - iLow(NULL, PERIOD_D1, gi_784)) / ld_40;
      gi_768 /= 5;
      gi_772 /= 10;
      gi_776 /= 20;
      gi_780 = (gi_764 + gi_768 + gi_772 + gi_776) / 4;
      g_dbl2str_788 = DoubleToStr(gi_780, l_digits_32 - 4.0);
      gs_unused_796 = (iHigh(NULL, PERIOD_D1, 1) - iLow(NULL, PERIOD_D1, 1)) / ld_40;
      Write("MP07", gi_120, Shift_X + gd_296, Shift_Y + gd_312 + 4.0 * gd_580, g_dbl2str_788, gi_740, gs_516, Warna_Av);
      Write("MP0711", gi_120, Shift_X + gd_296 + 40.0, Shift_Y + gd_312 + 4.0 * gd_580, "Av : ", gi_740, gs_516, Warna_Av);
      gd_620 = Time[4] - Time[5] - MathMod(TimeCurrent(), Time[4] - Time[5]);
      gd_612 = gd_620 / 60.0;
      gd_620 = 60.0 * (gd_612 - MathFloor(gd_612));
      gd_612 = MathFloor(gd_612);
      g_dbl2str_432 = DoubleToStr(gd_612, 0);
      g_dbl2str_440 = DoubleToStr(gd_620, 0);
      gs_548 = g_dbl2str_432 + ":" + g_dbl2str_440;
      Write("MP08", gi_120, Shift_X + gd_296, Shift_Y + gd_312 + 7.0 * gd_580, gs_548, gi_740, gs_516, Price_color_Hi);
      Write("MP0811", gi_120, Shift_X + gd_296 + 40.0, Shift_Y + gd_312 + 7.0 * gd_580, "Time : ", gi_740, gs_516, Price_color_Hi);
      gd_612 = (Ask - Bid) / ld_40;
      gs_548 = DoubleToStr(gd_612, l_digits_32 - 3.0);
      if ((Ask - Bid) / ld_40 < li_0) g_color_504 = Price_color_Up;
      else {
         if ((Ask - Bid) / ld_40 > li_0) g_color_504 = Price_color_Dn1;
         else g_color_504 = Price_color_Nt;
      }
      Write("MP09", gi_120, Shift_X + gd_296, Shift_Y + gd_312 + 5.0 * gd_580, gs_548, gi_740, gs_516, g_color_504);
      Write("MP0911", gi_120, Shift_X + gd_296 + 40.0, Shift_Y + gd_312 + 5.0 * gd_580, "Sprd : ", gi_740, gs_516, g_color_504);
      gd_612 = MarketInfo(Symbol(), MODE_STOPLEVEL) * ld_48;
      gs_548 = DoubleToStr(gd_612, 0);
      Write("MP09a", gi_120, Shift_X + gd_296, Shift_Y + gd_312 + 6.0 * gd_580, gs_548, gi_740, gs_516, Price_color_Up);
      Write("MP0911a", gi_120, Shift_X + gd_296 + 40.0, Shift_Y + gd_312 + 6.0 * gd_580, "S.Lvl : ", gi_740, gs_516, Price_color_Up);
      if (Show_Symbol == TRUE) {
         Write("MP0912", gi_120, Shift_X + gd_296, Shift_Y + gd_312 + 7.5 * gd_580, "____________", gi_740, gs_516, LineColor);
         Write("MP09121", gi_120, Shift_X + gd_296, Shift_Y + gd_312 + 9.0 * gd_580, "____________", gi_740, gs_516, LineColor);
         Write("MP0913", gi_120, Shift_X + gd_296 + 8.0, Shift_Y + gd_312 + 8.45 * gd_580, ls_4, 11, gs_516, SymbolColor);
         ld_64 = Period();
         if (ld_64 == 1.0) ls_56 = "M1";
         else {
            if (ld_64 == 5.0) ls_56 = "M5";
            else {
               if (ld_64 == 15.0) ls_56 = "M15";
               else {
                  if (ld_64 == 30.0) ls_56 = "M30";
                  else {
                     if (ld_64 == 60.0) ls_56 = "H1";
                     else {
                        if (ld_64 == 240.0) ls_56 = "H4";
                        else {
                           if (ld_64 == 1440.0) ls_56 = "D1";
                           else {
                              if (ld_64 == 43200.0) ls_56 = "MN1";
                              else ls_56 = "-";
                           }
                        }
                     }
                  }
               }
            }
         }
         Write("MP0914", gi_120, Shift_X + gd_296 + 8.0, Shift_Y + gd_312 + 10.0 * gd_580, ls_56, 9, gs_516, Price_color_Lo);
      }
      Write("MP091444", gi_120, gd_296 - 5.0, gd_312 - 49.0, "Forex Mutant System", 6, gs_516, Price_color_Lo);
   }
   return (0);
}

void Write(string a_name_0, double ad_unused_8, int a_x_16, int a_y_20, string a_text_24, int a_fontsize_32, string a_fontname_36, color a_color_44 = -1, int ai_unused_48 = 0) {
   ObjectCreate(a_name_0, OBJ_LABEL, window, 0, 0);
   ObjectSetText(a_name_0, a_text_24, a_fontsize_32, a_fontname_36, a_color_44);
   ObjectSet(a_name_0, OBJPROP_CORNER, g_corner_116);
   ObjectSet(a_name_0, OBJPROP_XDISTANCE, a_x_16);
   ObjectSet(a_name_0, OBJPROP_YDISTANCE, a_y_20);
   ObjectSetText("signal", CharToStr(164), 60, "Wingdings", Gold);
   if (a_name_0 == "MP5221") {
      ObjectCreate(a_name_0, OBJ_LABEL, window, 0, 0);
      ObjectSetText(a_name_0, a_text_24, a_fontsize_32, a_fontname_36, a_color_44);
      ObjectSet(a_name_0, OBJPROP_CORNER, g_corner_116);
      ObjectSet(a_name_0, OBJPROP_ANGLE, 0);
      ObjectSet(a_name_0, OBJPROP_XDISTANCE, a_x_16);
      ObjectSet(a_name_0, OBJPROP_YDISTANCE, a_y_20);
      ObjectSetText("signal", CharToStr(164), 60, "Wingdings", Gold);
   }
   if (a_name_0 == "MP091444") {
      ObjectCreate(a_name_0, OBJ_LABEL, window, 0, 0);
      ObjectSetText(a_name_0, a_text_24, a_fontsize_32, a_fontname_36, a_color_44);
      ObjectSet(a_name_0, OBJPROP_CORNER, 3);
      ObjectSet(a_name_0, OBJPROP_ANGLE, 0);
      ObjectSet(a_name_0, OBJPROP_XDISTANCE, a_x_16);
      ObjectSet(a_name_0, OBJPROP_YDISTANCE, a_y_20);
   }
}

int CheckWarna(double ad_0, double ad_8, int ai_16, int ai_20) {
   if (ad_0 > ad_8) return (ai_16);
   return (ai_20);
}

int SERVER2(string a_name_0, int ai_unused_8, int ai_unused_12, int a_corner_16) {
   ObjectCreate(a_name_0, OBJ_LABEL, 0, 0, 0);
   ObjectSet(a_name_0, OBJPROP_CORNER, a_corner_16);
   ObjectSet(a_name_0, OBJPROP_XDISTANCE, 5);
   ObjectSet(a_name_0, OBJPROP_YDISTANCE, 10);
   ObjectSet(a_name_0, OBJPROP_BACK, TRUE);
   return (0);
}