/*
   Generated by EX4-TO-MQ4 decompiler V4.0.224.1 []
   Website: http://purebeam.biz
   E-mail : purebeam@gmail.com
*/
#property copyright "Rich"
#property link      "bestmt4brokers.com"

#property indicator_chart_window
#property indicator_buffers 6
#property indicator_color1 Blue
#property indicator_color2 Red
#property indicator_color3 Yellow
#property indicator_color4 Yellow
#property indicator_color5 White
#property indicator_color6 White

#import "30PIPS.dll"
   int LoadSystem(string& a0[], int& a1[], double& a2[]);
#import

string gsa_76[14];
int gia_80[150];
double gda_84[150];
bool gi_88 = FALSE;
int gi_92 = 10;
int gi_unused_96 = 0;
int gi_100 = 0;
int gi_104 = 0;
int gi_108 = 0;
int gi_112 = 0;
int gi_116 = 0;
int gi_120 = 0;
int gi_124 = 0;
int gi_128 = 0;
int gi_132 = 0;
int gi_136 = 0;
int gi_140 = 0;
int gi_144 = 0;
double g_ibuf_148[];
double g_ibuf_152[];
double g_ibuf_156[];
double g_ibuf_160[];
double g_ibuf_164[];
double g_ibuf_168[];
double gd_172 = 0.0001;
double gd_180 = 0.0;
double gd_188 = 0.0;
double gd_196 = 0.0;
double gd_204 = 0.0;
double gd_212 = 0.0;
double gd_220 = 0.0;
double gd_228 = 0.0;
double gd_236 = 0.0;
int g_bars_244 = 0;
int g_bars_248 = 0;
int g_bars_252 = 0;
int g_bars_256 = 0;
int g_bars_260 = 0;
int g_bars_264 = 0;
int g_bars_268 = 0;
int g_day_272;
int g_count_276 = 0;

int init() {
   _kuwQuJnmSsixpiqexkdPQijtyfejN(2, 1, "loading _system ...");
   gi_88 = FALSE;
   _kUsYjjFPKTbCzAanHOZUzTJYNlURO(1, 3);
   _KGzTXaNAcvdBsMkYgLbpWEqfMutvP(gsa_76);
   SetIndexStyle(0, DRAW_ARROW, STYLE_SOLID, 3);
   SetIndexStyle(1, DRAW_ARROW, STYLE_SOLID, 3);
   SetIndexStyle(2, DRAW_ARROW, STYLE_SOLID, 3);
   SetIndexStyle(3, DRAW_ARROW, STYLE_SOLID, 3);
   SetIndexStyle(4, DRAW_ARROW, STYLE_SOLID, 3);
   SetIndexStyle(5, DRAW_ARROW, STYLE_SOLID, 3);
   SetIndexArrow(0, 233);
   SetIndexArrow(1, 234);
   SetIndexArrow(2, 233);
   SetIndexArrow(3, 234);
   SetIndexArrow(4, 233);
   SetIndexArrow(5, 234);
   SetIndexLabel(0, "BUY");
   SetIndexLabel(1, "SELL");
   SetIndexLabel(2, "BUY (aggressive)");
   SetIndexLabel(3, "SELL (aggressive)");
   SetIndexLabel(4, "BUY (perfect)");
   SetIndexLabel(5, "SELL (perfect)");
   SetIndexBuffer(0, g_ibuf_148);
   SetIndexBuffer(1, g_ibuf_152);
   SetIndexBuffer(2, g_ibuf_156);
   SetIndexBuffer(3, g_ibuf_160);
   SetIndexBuffer(4, g_ibuf_164);
   SetIndexBuffer(5, g_ibuf_168);
   gd_172 = _wXbTxIsIutbYfSxQJvySKhYjWJJcJ();
   return (0);
}

int deinit() {
   ObjectsDeleteAll();
   return (0);
}

int start() {
   if (gsa_76[5] == "0") {
      _KGzTXaNAcvdBsMkYgLbpWEqfMutvP(gsa_76);
      return (0);
   }
   if (IsTesting()) {
      if (gi_88 == FALSE) {
         gi_92 = LoadSystem(gsa_76, gia_80, gda_84);
         gi_88 = TRUE;
         if (gi_92 == 0) {
            _kuwQuJnmSsixpiqexkdPQijtyfejN(2, 1, "System loaded successfully");
            gi_unused_96 = gia_80[0];
            gi_136 = gia_80[1];
            gi_140 = gia_80[2];
            gi_144 = gia_80[3];
            gi_100 = gia_80[4];
            gi_104 = gia_80[5];
            gi_108 = gia_80[6];
            gi_112 = gia_80[7];
            gi_116 = gia_80[8];
            gi_120 = gia_80[9];
            gi_124 = gia_80[10];
            gi_128 = gia_80[11];
            gi_132 = gia_80[12];
         } else _kuwQuJnmSsixpiqexkdPQijtyfejN(2, 1, "Error loading  system(" + gi_92 + ")");
      }
   } else {
      if (gi_88 == FALSE && _kUsYjjFPKTbCzAanHOZUzTJYNlURO(0, 3)) {
         gi_92 = LoadSystem(gsa_76, gia_80, gda_84);
         gi_88 = TRUE;
         if (gi_92 == 0) {
            _kuwQuJnmSsixpiqexkdPQijtyfejN(2, 1, "System loaded successfully");
            gi_unused_96 = gia_80[0];
            gi_136 = gia_80[1];
            gi_140 = gia_80[2];
            gi_144 = gia_80[3];
            gi_100 = gia_80[4];
            gi_104 = gia_80[5];
            gi_108 = gia_80[6];
            gi_112 = gia_80[7];
            gi_116 = gia_80[8];
            gi_120 = gia_80[9];
            gi_124 = gia_80[10];
            gi_128 = gia_80[11];
            gi_132 = gia_80[12];
         } else _kuwQuJnmSsixpiqexkdPQijtyfejN(2, 1, "Error loading  system(" + gi_92 + ")");
      }
   }
   if (gi_92 > 0) return (0);
   double ld_0 = Time[4] - Time[5] - MathMod(TimeCurrent(), Time[4] - Time[5]);
   double ld_8 = ld_0 / 60.0;
   ld_0 = 60.0 * (ld_8 - MathFloor(ld_8));
   ld_8 = MathFloor(ld_8);
   Comment("Time for next bar: ", ld_8, " min ", ld_0, " sec");
   if (_PjXBYXkoqxXspQeLpRAhQRwAQrfBw()) _ReEidVRkmzDhOkWoGMIotrtZibMir(1);
   int li_16 = 0;
   int l_shift_20 = iBarShift(NULL, 0, iTime(Symbol(), PERIOD_D1, 0), TRUE);
   if (l_shift_20 <= 0 || l_shift_20 >= 90) l_shift_20 = 90;
   for (int l_index_24 = 0; l_index_24 < l_shift_20; l_index_24++) {
      g_ibuf_148[l_index_24] = EMPTY_VALUE;
      g_ibuf_156[l_index_24] = EMPTY_VALUE;
      g_ibuf_164[l_index_24] = EMPTY_VALUE;
      g_ibuf_152[l_index_24] = EMPTY_VALUE;
      g_ibuf_160[l_index_24] = EMPTY_VALUE;
      g_ibuf_168[l_index_24] = EMPTY_VALUE;
      li_16 = _YwGZqKLvAJZVMiXXTTTGJqfSFXMkZ(l_index_24);
      if (li_16 == 1) g_ibuf_148[l_index_24] = Low[l_index_24] - 5.0 * gd_172;
      if (li_16 == -1) g_ibuf_152[l_index_24] = High[l_index_24] + 5.0 * gd_172;
      if (li_16 == 2) g_ibuf_156[l_index_24] = Low[l_index_24] - 5.0 * gd_172;
      if (li_16 == -2) g_ibuf_160[l_index_24] = High[l_index_24] + 5.0 * gd_172;
      if (li_16 == 3) g_ibuf_164[l_index_24] = Low[l_index_24] - 5.0 * gd_172;
      if (li_16 == -3) g_ibuf_168[l_index_24] = High[l_index_24] + 5.0 * gd_172;
   }
   if (g_ibuf_148[0] != EMPTY_VALUE) _yYFVxBLFVKFyHEJjLZoGNzskIqrAV("Buy Signal  @ " + Symbol() + "-" + _BPgmoJTVFIaaFoeHnncKgMhfhACfQ(), 1);
   if (g_ibuf_152[0] != EMPTY_VALUE) _yYFVxBLFVKFyHEJjLZoGNzskIqrAV("Sell Signal  @ " + Symbol() + "-" + _BPgmoJTVFIaaFoeHnncKgMhfhACfQ(), 2);
   if (g_ibuf_156[0] != EMPTY_VALUE) _yYFVxBLFVKFyHEJjLZoGNzskIqrAV("Buy Signal  @ " + Symbol() + "-" + _BPgmoJTVFIaaFoeHnncKgMhfhACfQ(), 3);
   if (g_ibuf_160[0] != EMPTY_VALUE) _yYFVxBLFVKFyHEJjLZoGNzskIqrAV("Sell Signal  @ " + Symbol() + "-" + _BPgmoJTVFIaaFoeHnncKgMhfhACfQ(), 4);
   if (g_ibuf_164[0] != EMPTY_VALUE) _yYFVxBLFVKFyHEJjLZoGNzskIqrAV("(WHITE) Buy Signal  @ " + Symbol() + "-" + _BPgmoJTVFIaaFoeHnncKgMhfhACfQ(), 5);
   if (g_ibuf_168[0] != EMPTY_VALUE) _yYFVxBLFVKFyHEJjLZoGNzskIqrAV("(WHITE) Sell Signal  @ " + Symbol() + "-" + _BPgmoJTVFIaaFoeHnncKgMhfhACfQ(), 6);
   return (0);
}

int _YwGZqKLvAJZVMiXXTTTGJqfSFXMkZ(int ai_0) {
   string ls_4 = "no value";
   double ld_12 = _OOzObNsUjQgUcKZSMQBcuwanvUeyp(gi_136, "", 0, ai_0, gi_100, gi_104, gi_108);
   if (ld_12 != EMPTY_VALUE) {
      if (ld_12 == High[ai_0]) ls_4 = "above";
      if (ld_12 == Low[ai_0]) ls_4 = "below";
   } else ls_4 = "no value";
   double ld_20 = _OOzObNsUjQgUcKZSMQBcuwanvUeyp(gi_144, "", 0, ai_0, gi_112, gi_116);
   string ls_28 = "";
   double ld_36 = _OOzObNsUjQgUcKZSMQBcuwanvUeyp(gi_140, "", 0, ai_0, gi_120, gi_124, gi_128, 0);
   double ld_44 = _OOzObNsUjQgUcKZSMQBcuwanvUeyp(gi_140, "", 0, ai_0, gi_120, gi_124, gi_128, 1);
   if (ld_36 != EMPTY_VALUE && ld_44 == EMPTY_VALUE) ls_28 = "blue";
   if (ld_44 != EMPTY_VALUE && ld_36 == EMPTY_VALUE) ls_28 = "red";
   double ld_52 = _ReEidVRkmzDhOkWoGMIotrtZibMir(0);
   int l_hour_60 = TimeHour(TimeCurrent());
   int li_64 = l_hour_60 >= gi_132;
   int l_bool_68 = TimeDay(TimeCurrent()) == TimeDay(Time[ai_0]);
   if (ls_4 == "below" && ld_20 < -100.0 && ls_28 == "blue" && Close[ai_0] > ld_52 && li_64 && l_bool_68) return (1);
   if (ls_4 == "above" && ld_20 > 100.0 && ls_28 == "red" && Close[ai_0] < ld_52 && li_64 && l_bool_68) return (-1);
   if (ls_4 == "below" && ld_20 < -100.0 && _KxsPhnjZEgvmyMDiXMWzcztPYsams(ai_0) && li_64 && l_bool_68) return (3);
   if (ls_4 == "above" && ld_20 > 100.0 && _KxsPhnjZEgvmyMDiXMWzcztPYsams(ai_0) && li_64 && l_bool_68) return (-3);
   if (ls_4 == "below" && ld_20 < -100.0 && Close[ai_0] > ld_52 && li_64 && l_bool_68) return (2);
   if (ls_4 == "above" && ld_20 > 100.0 && Close[ai_0] < ld_52 && li_64 && l_bool_68) return (-2);
   return (0);
}

double _wXbTxIsIutbYfSxQJvySKhYjWJJcJ(string a_symbol_0 = "") {
   if (a_symbol_0 == "" || a_symbol_0 == Symbol()) {
      if (Point == 0.00001) return (0.0001);
      if (Point == 0.001) return (0.01);
      return (Point);
   }
   RefreshRates();
   double l_point_8 = MarketInfo(a_symbol_0, MODE_POINT);
   if (l_point_8 == 0.00001) return (0.0001);
   if (l_point_8 == 0.001) return (0.01);
   return (l_point_8);
}

int _yYFVxBLFVKFyHEJjLZoGNzskIqrAV(string as_0, int ai_8) {
   switch (ai_8) {
   case 1:
      if (g_bars_244 == 0 || g_bars_244 < Bars) {
         Alert(as_0);
         g_bars_244 = Bars;
         return (1);
      }
      break;
   case 2:
      if (g_bars_248 == 0 || g_bars_248 < Bars) {
         Alert(as_0);
         g_bars_248 = Bars;
         return (1);
      }
      break;
   case 3:
      if (g_bars_252 == 0 || g_bars_252 < Bars) {
         Alert(as_0);
         g_bars_252 = Bars;
         return (1);
      }
      break;
   case 4:
      if (g_bars_256 == 0 || g_bars_256 < Bars) {
         Alert(as_0);
         g_bars_256 = Bars;
         return (1);
      }
      break;
   case 5:
      if (g_bars_260 == 0 || g_bars_260 < Bars) {
         Alert(as_0);
         g_bars_260 = Bars;
         return (1);
      }
      break;
   case 6:
      if (g_bars_264 == 0 || g_bars_264 < Bars) {
         Alert(as_0);
         g_bars_264 = Bars;
         return (1);
      }
      break;
   case 7:
      if (g_bars_268 == 0 || g_bars_268 < Bars) {
         Alert(as_0);
         g_bars_268 = Bars;
         return (1);
      }
      break;
   }
   return (0);
}

string _BPgmoJTVFIaaFoeHnncKgMhfhACfQ() {
   switch (Period()) {
   case PERIOD_M1:
      return ("M1");
   case PERIOD_M5:
      return ("M5");
   case PERIOD_M15:
      return ("M15");
   case PERIOD_M30:
      return ("M30");
   case PERIOD_H1:
      return ("H1");
   case PERIOD_H4:
      return ("H4");
   case PERIOD_D1:
      return ("D1");
   case PERIOD_W1:
      return ("W1");
   case PERIOD_MN1:
      return ("MN1");
   }
   return ("");
}

bool _PjXBYXkoqxXspQeLpRAhQRwAQrfBw() {
   int l_day_0 = TimeDay(TimeCurrent());
   if (l_day_0 != g_day_272) {
      g_day_272 = l_day_0;
      Print("New Day");
      return (TRUE);
   }
   return (FALSE);
}

double _ReEidVRkmzDhOkWoGMIotrtZibMir(bool ai_0 = TRUE) {
   double lda_4[1][6];
   double ld_8;
   double ld_16;
   double ld_24;
   ArrayCopyRates(lda_4, Symbol(), PERIOD_D1);
   if (DayOfWeek() == 1) {
      if (TimeDayOfWeek(iTime(Symbol(), PERIOD_D1, 1)) == 5) {
         ld_8 = lda_4[1][4];
         ld_16 = lda_4[1][3];
         ld_24 = lda_4[1][2];
      } else {
         for (int li_32 = 5; li_32 >= 0; li_32--) {
            if (TimeDayOfWeek(iTime(Symbol(), PERIOD_D1, li_32)) == 5) {
               ld_8 = lda_4[li_32][4];
               ld_16 = lda_4[li_32][3];
               ld_24 = lda_4[li_32][2];
            }
         }
      }
   } else {
      ld_8 = lda_4[1][4];
      ld_16 = lda_4[1][3];
      ld_24 = lda_4[1][2];
   }
   gd_180 = ld_16 - ld_24;
   gd_188 = (ld_16 + ld_24 + ld_8) / 3.0;
   gd_196 = ld_16 + 2.0 * (gd_188 - ld_24);
   gd_204 = gd_188 + (2.0 * gd_188 - ld_24 - (2.0 * gd_188 - ld_16));
   gd_212 = 2.0 * gd_188 - ld_24;
   gd_220 = 2.0 * gd_188 - ld_16;
   gd_228 = gd_188 - (2.0 * gd_188 - ld_24 - (2.0 * gd_188 - ld_16));
   gd_236 = ld_24 - 2.0 * (ld_16 - gd_188);
   if (ai_0) {
      _yUNaEeMFwgYeoqNYcujObmNQdJoyt(gd_196, "R3", Red, 1, 2);
      _tqmjKMCOvbFhKOpznXlDfdTqpeVIG("Resistance 3", gd_196, Red);
      _yUNaEeMFwgYeoqNYcujObmNQdJoyt(gd_204, "R2", Red, 1, 2);
      _tqmjKMCOvbFhKOpznXlDfdTqpeVIG("Resistance 2", gd_204, Red);
      _yUNaEeMFwgYeoqNYcujObmNQdJoyt(gd_212, "R1", Red, 1, 2);
      _tqmjKMCOvbFhKOpznXlDfdTqpeVIG("Resistance 1", gd_212, Red);
      _yUNaEeMFwgYeoqNYcujObmNQdJoyt(gd_188, "PIVIOT", Fuchsia, 1, 2);
      _tqmjKMCOvbFhKOpznXlDfdTqpeVIG("Piviot level", gd_188, Fuchsia);
      _yUNaEeMFwgYeoqNYcujObmNQdJoyt(gd_220, "S1", LimeGreen, 1, 2);
      _tqmjKMCOvbFhKOpznXlDfdTqpeVIG("Support 1", gd_220, LimeGreen);
      _yUNaEeMFwgYeoqNYcujObmNQdJoyt(gd_228, "S2", LimeGreen, 1, 2);
      _tqmjKMCOvbFhKOpznXlDfdTqpeVIG("Support 2", gd_228, LimeGreen);
      _yUNaEeMFwgYeoqNYcujObmNQdJoyt(gd_236, "S3", LimeGreen, 1, 2);
      _tqmjKMCOvbFhKOpznXlDfdTqpeVIG("Support 3", gd_236, LimeGreen);
      ObjectsRedraw();
   }
   return (gd_188);
}

void _tqmjKMCOvbFhKOpznXlDfdTqpeVIG(string a_name_0, double a_price_8, color a_color_16) {
   if (ObjectFind(a_name_0) != 0) {
      ObjectCreate(a_name_0, OBJ_TEXT, 0, Time[10], a_price_8);
      ObjectSetText(a_name_0, a_name_0, 8, "Arial", CLR_NONE);
      ObjectSet(a_name_0, OBJPROP_COLOR, a_color_16);
      return;
   }
   ObjectMove(a_name_0, 0, Time[10], a_price_8);
}

void _yUNaEeMFwgYeoqNYcujObmNQdJoyt(double a_price_0, string a_name_8, color a_color_16, int ai_20, int a_width_24) {
   if (ObjectFind(a_name_8) == -1) {
      ObjectCreate(a_name_8, OBJ_HLINE, 0, Time[0], a_price_0, Time[0], a_price_0);
      if (ai_20 == 1) ObjectSet(a_name_8, OBJPROP_STYLE, STYLE_SOLID);
      else ObjectSet(a_name_8, OBJPROP_STYLE, STYLE_DOT);
      ObjectSet(a_name_8, OBJPROP_COLOR, a_color_16);
      ObjectSet(a_name_8, OBJPROP_WIDTH, a_width_24);
   } else {
      ObjectDelete(a_name_8);
      ObjectCreate(a_name_8, OBJ_HLINE, 0, Time[0], a_price_0, Time[0], a_price_0);
      if (ai_20 == 1) ObjectSet(a_name_8, OBJPROP_STYLE, STYLE_SOLID);
      else ObjectSet(a_name_8, OBJPROP_STYLE, STYLE_DOT);
      ObjectSet(a_name_8, OBJPROP_COLOR, a_color_16);
      ObjectSet(a_name_8, OBJPROP_WIDTH, a_width_24);
   }
   ObjectsRedraw();
}

int _KxsPhnjZEgvmyMDiXMWzcztPYsams(int ai_0) {
   double l_high_4 = High[ai_0];
   double l_low_12 = Low[ai_0];
   if (l_high_4 >= gd_188 && l_low_12 <= gd_188) return (1);
   if (l_high_4 >= gd_212 && l_low_12 <= gd_212) return (1);
   if (l_high_4 >= gd_204 && l_low_12 <= gd_204) return (1);
   if (l_high_4 >= gd_196 && l_low_12 <= gd_196) return (1);
   if (l_high_4 >= gd_220 && l_low_12 <= gd_220) return (1);
   if (l_high_4 >= gd_228 && l_low_12 <= gd_228) return (1);
   if (l_high_4 >= gd_236 && l_low_12 <= gd_236) return (1);
   return (0);
}

double _UaUYhrtAVzirxMRmlxrHKKLUCiTcx(int ai_0, int a_period_4, int a_ma_method_8 = 3, int a_applied_price_12 = 0) {
   return (iMA(NULL, 0, a_period_4, 0, a_ma_method_8, a_applied_price_12, ai_0));
}

double _OOzObNsUjQgUcKZSMQBcuwanvUeyp(int ai_0, string a_symbol_4 = "", int a_timeframe_12 = 0, int ai_16 = 0, double a_period_20 = 0.0, double ad_28 = 0.0, double a_period_36 = 0.0, double ad_44 = 0.0, double a_period_52 = 0.0, double ad_60 = 0.0, double a_ma_method_68 = 0.0, double a_applied_price_76 = 0.0, double ad_84 = 0.0, double ad_unused_92 = 0.0) {
   double lda_104[500];
   double lda_108[500];
   double lda_112[500];
   double lda_116[500];
   double lda_120[500];
   double lda_124[500];
   double lda_128[500];
   double lda_132[500];
   double lda_136[];
   double lda_140[];
   int li_148;
   int li_156;
   int li_160;
   double l_ihigh_192;
   double l_iopen_200;
   double l_ilow_208;
   double l_iclose_216;
   double ld_224;
   double ld_232;
   double ld_240;
   double ld_248;
   double ld_256;
   double ld_264;
   double ld_272;
   double ld_280;
   double ld_288;
   double ld_296;
   double l_ilow_304;
   double l_ihigh_312;
   double ld_320;
   bool li_328;
   bool li_332;
   bool li_336;
   double l_ima_344;
   double l_ima_352;
   double l_ima_360;
   double ld_unused_368;
   double ld_376;
   bool li_100 = FALSE;
   if (a_symbol_4 == "") a_symbol_4 = Symbol();
   if (a_timeframe_12 == 0) a_timeframe_12 = Period();
   if (a_symbol_4 != Symbol() || a_timeframe_12 != Period()) li_100 = TRUE;
   int li_184 = 500;
   int li_188 = iBars(a_symbol_4, a_timeframe_12);
   switch (ai_0) {
   case 1:
      if (li_100) {
         RefreshRates();
         return (iAC(a_symbol_4, a_timeframe_12, ai_16));
      }
      return (iAC(NULL, 0, ai_16));
   case 2:
      if (li_100) {
         RefreshRates();
         return (iAD(a_symbol_4, a_timeframe_12, ai_16));
      }
      return (iAD(NULL, 0, ai_16));
   case 3:
      if (li_100) {
         RefreshRates();
         return (iAlligator(a_symbol_4, a_timeframe_12, a_period_20, ad_28, a_period_36, ad_44, a_period_52, ad_60, a_ma_method_68, a_applied_price_76, ad_84, ai_16));
      }
      return (iAlligator(NULL, 0, a_period_20, ad_28, a_period_36, ad_44, a_period_52, ad_60, a_ma_method_68, a_applied_price_76, ad_84, ai_16));
   case 4:
      if (li_100) {
         RefreshRates();
         return (iADX(a_symbol_4, a_timeframe_12, a_period_20, ad_28, a_period_36, ai_16));
      }
      return (iADX(NULL, 0, a_period_20, ad_28, a_period_36, ai_16));
   case 5:
      if (li_100) {
         RefreshRates();
         return (iATR(a_symbol_4, a_timeframe_12, a_period_20, ai_16));
      }
      return (iATR(NULL, 0, a_period_20, ai_16));
   case 6:
      if (li_100) {
         RefreshRates();
         return (iAO(a_symbol_4, a_timeframe_12, ai_16));
      }
      return (iAO(NULL, 0, ai_16));
   case 7:
      if (li_100) {
         RefreshRates();
         return (iBearsPower(a_symbol_4, a_timeframe_12, a_period_20, ad_28, ai_16));
      }
      return (iBearsPower(NULL, 0, a_period_20, ad_28, ai_16));
   case 8:
      if (li_100) {
         RefreshRates();
         return (iBands(a_symbol_4, a_timeframe_12, a_period_20, ad_28, a_period_36, ad_44, a_period_52, ai_16));
      }
      return (iBands(NULL, 0, a_period_20, ad_28, a_period_36, ad_44, a_period_52, ai_16));
   case 9:
      if (li_100) {
         RefreshRates();
         return (iBullsPower(a_symbol_4, a_timeframe_12, a_period_20, ad_28, ai_16));
      }
      return (iBullsPower(NULL, 0, a_period_20, ad_28, ai_16));
   case 10:
      if (li_100) {
         RefreshRates();
         return (iCCI(a_symbol_4, a_timeframe_12, a_period_20, ad_28, ai_16));
      }
      return (iCCI(NULL, 0, a_period_20, ad_28, ai_16));
   case 11:
      if (li_100) {
         RefreshRates();
         return (iDeMarker(a_symbol_4, a_timeframe_12, a_period_20, ai_16));
      }
      return (iDeMarker(NULL, 0, a_period_20, ai_16));
   case 12:
      if (li_100) {
         RefreshRates();
         return (iEnvelopes(a_symbol_4, a_timeframe_12, a_period_20, ad_28, a_period_36, ad_44, a_period_52, ad_60, ai_16));
      }
      return (iEnvelopes(NULL, 0, a_period_20, ad_28, a_period_36, ad_44, a_period_52, ad_60, ai_16));
   case 13:
      if (li_100) {
         RefreshRates();
         return (iForce(a_symbol_4, a_timeframe_12, a_period_20, ad_28, a_period_36, ai_16));
      }
      return (iForce(NULL, 0, a_period_20, ad_28, a_period_36, ai_16));
   case 14:
      if (li_100) {
         RefreshRates();
         return (iFractals(a_symbol_4, a_timeframe_12, a_period_20, ai_16));
      }
      return (iFractals(NULL, 0, a_period_20, ai_16));
   case 15:
      if (li_100) {
         RefreshRates();
         return (iIchimoku(a_symbol_4, a_timeframe_12, a_period_20, ad_28, a_period_36, ad_44, ai_16));
      }
      return (iIchimoku(NULL, 0, a_period_20, ad_28, a_period_36, ad_44, ai_16));
   case 16:
      if (li_100) {
         RefreshRates();
         return (iBWMFI(a_symbol_4, a_timeframe_12, ai_16));
      }
      return (iBWMFI(NULL, 0, ai_16));
   case 17:
      if (li_100) {
         RefreshRates();
         return (iMomentum(a_symbol_4, a_timeframe_12, a_period_20, ad_28, ai_16));
      }
      return (iMomentum(NULL, 0, a_period_20, ad_28, ai_16));
   case 18:
      if (li_100) {
         RefreshRates();
         return (iMFI(a_symbol_4, a_timeframe_12, a_period_20, ai_16));
      }
      return (iMFI(NULL, 0, a_period_20, ai_16));
   case 19:
      if (li_100) {
         RefreshRates();
         return (iMA(a_symbol_4, a_timeframe_12, a_period_20, ad_28, a_period_36, ad_44, ai_16));
      }
      return (iMA(NULL, 0, a_period_20, ad_28, a_period_36, ad_44, ai_16));
   case 20:
      if (li_100) {
         RefreshRates();
         return (iOsMA(a_symbol_4, a_timeframe_12, a_period_20, ad_28, a_period_36, ad_44, ai_16));
      }
      return (iOsMA(NULL, 0, a_period_20, ad_28, a_period_36, ad_44, ai_16));
   case 21:
      if (li_100) {
         RefreshRates();
         return (iMACD(a_symbol_4, a_timeframe_12, a_period_20, ad_28, a_period_36, ad_44, a_period_52, ai_16));
      }
      return (iMACD(NULL, 0, a_period_20, ad_28, a_period_36, ad_44, a_period_52, ai_16));
   case 22:
      if (li_100) {
         RefreshRates();
         return (iOBV(a_symbol_4, a_timeframe_12, a_period_20, ai_16));
      }
      return (iOBV(NULL, 0, a_period_20, ai_16));
   case 23:
      if (li_100) {
         RefreshRates();
         return (iSAR(a_symbol_4, a_timeframe_12, a_period_20, ad_28, ai_16));
      }
      return (iSAR(NULL, 0, a_period_20, ad_28, ai_16));
   case 24:
      if (li_100) {
         RefreshRates();
         return (iRSI(a_symbol_4, a_timeframe_12, a_period_20, ad_28, ai_16));
      }
      return (iRSI(NULL, 0, a_period_20, ad_28, ai_16));
   case 25:
      if (li_100) {
         RefreshRates();
         return (iRVI(a_symbol_4, a_timeframe_12, a_period_20, ad_28, ai_16));
      }
      return (iRVI(NULL, 0, a_period_20, ad_28, ai_16));
   case 26:
      if (li_100) {
         RefreshRates();
         return (iStdDev(a_symbol_4, a_timeframe_12, a_period_20, ad_28, a_period_36, ad_44, ai_16));
      }
      return (iStdDev(NULL, 0, a_period_20, ad_28, a_period_36, ad_44, ai_16));
   case 27:
      if (li_100) {
         RefreshRates();
         return (iStochastic(a_symbol_4, a_timeframe_12, a_period_20, ad_28, a_period_36, ad_44, a_period_52, ad_60, ai_16));
      }
      return (iStochastic(NULL, 0, a_period_20, ad_28, a_period_36, ad_44, a_period_52, ad_60, ai_16));
   case 28:
      if (li_100) {
         RefreshRates();
         return (iWPR(a_symbol_4, a_timeframe_12, a_period_20, ai_16));
      }
      return (iWPR(NULL, 0, a_period_20, ai_16));
   case 29:
      if (li_100) {
         RefreshRates();
         return (iBarShift(a_symbol_4, a_timeframe_12, a_period_20, ad_28));
      }
      return (iBarShift(NULL, 0, a_period_20, ad_28));
   case 30:
      if (li_100) {
         RefreshRates();
         return (iOpen(a_symbol_4, a_timeframe_12, ai_16));
      }
      return (iOpen(NULL, 0, ai_16));
   case 31:
      if (li_100) {
         RefreshRates();
         return (iHigh(a_symbol_4, a_timeframe_12, ai_16));
      }
      return (iHigh(NULL, 0, ai_16));
   case 32:
      if (li_100) {
         RefreshRates();
         return (iLow(a_symbol_4, a_timeframe_12, ai_16));
      }
      return (iLow(NULL, 0, ai_16));
   case 33:
      if (li_100) {
         RefreshRates();
         return (iClose(a_symbol_4, a_timeframe_12, ai_16));
      }
      return (iClose(NULL, 0, ai_16));
   case 34:
      if (li_100) {
         RefreshRates();
         return (iTime(a_symbol_4, a_timeframe_12, ai_16));
      }
      return (iTime(NULL, 0, ai_16));
   case 35:
      if (li_100) {
         RefreshRates();
         return (iVolume(a_symbol_4, a_timeframe_12, ai_16));
      }
      return (iVolume(NULL, 0, ai_16));
   case 36:
      if (li_100) {
         RefreshRates();
         return (iBars(a_symbol_4, a_timeframe_12));
      }
      return (iBars(NULL, 0));
   case 37:
      if (li_100) {
         RefreshRates();
         return (iHighest(a_symbol_4, a_timeframe_12, a_period_20, ad_28, ai_16));
      }
      return (iHighest(NULL, 0, a_period_20, ad_28, ai_16));
   case 38:
      if (li_100) {
         RefreshRates();
         return (iLowest(a_symbol_4, a_timeframe_12, a_period_20, ad_28, ai_16));
      }
      return (iLowest(NULL, 0, a_period_20, ad_28, ai_16));
   case 39:
      if (li_100) {
         RefreshRates();
         return (iHigh(a_symbol_4, a_timeframe_12, iHighest(a_symbol_4, a_timeframe_12, a_period_20, ad_28, ai_16)));
      }
      return (iHigh(NULL, 0, iHighest(NULL, 0, a_period_20, ad_28, ai_16)));
   case 40:
      if (li_100) {
         RefreshRates();
         return (iLow(a_symbol_4, a_timeframe_12, iLowest(a_symbol_4, a_timeframe_12, a_period_20, ad_28, ai_16)));
      }
      return (iLow(NULL, 0, iLowest(NULL, 0, a_period_20, ad_28, ai_16)));
   case 41:
      RefreshRates();
      return (MarketInfo(a_symbol_4, a_period_20));
   case 42:
      l_ima_344 = 0;
      l_ima_352 = 0;
      l_ima_360 = 0;
      ld_unused_368 = 0;
      ld_376 = ad_44 * gd_172;
      if (li_100) {
         RefreshRates();
         l_ima_344 = iMA(a_symbol_4, a_timeframe_12, a_period_20, 0, MODE_SMA, PRICE_CLOSE, ai_16);
         l_ima_352 = iMA(a_symbol_4, a_timeframe_12, ad_28, 0, MODE_SMA, PRICE_CLOSE, ai_16);
         l_ima_360 = iMA(a_symbol_4, a_timeframe_12, a_period_36, 0, MODE_SMA, PRICE_CLOSE, ai_16);
         if (l_ima_344 - l_ima_352 >= ld_376 && l_ima_352 - l_ima_360 >= ld_376 && Close[ai_16] >= l_ima_344 + a_period_52 * gd_172) return (1);
         if (l_ima_360 - l_ima_352 >= ld_376 && l_ima_352 - l_ima_344 >= ld_376 && Close[ai_16] <= l_ima_344 - a_period_52 * gd_172) return (-1);
         return (0);
      }
      l_ima_344 = iMA(NULL, 0, a_period_20, 0, MODE_SMA, PRICE_CLOSE, ai_16);
      l_ima_352 = iMA(NULL, 0, ad_28, 0, MODE_SMA, PRICE_CLOSE, ai_16);
      l_ima_360 = iMA(NULL, 0, a_period_36, 0, MODE_SMA, PRICE_CLOSE, ai_16);
      if (l_ima_344 - l_ima_352 >= ld_376 && l_ima_352 - l_ima_360 >= ld_376 && Close[ai_16] >= l_ima_344 + a_period_52 * gd_172) return (1);
      if (l_ima_360 - l_ima_352 >= ld_376 && l_ima_360 - l_ima_344 >= ld_376 && Close[ai_16] <= l_ima_352 - a_period_52 * gd_172) return (-1);
      return (0);
   case 43:
      ArraySetAsSeries(lda_104, TRUE);
      ArraySetAsSeries(lda_108, TRUE);
      ArraySetAsSeries(lda_112, TRUE);
      ArraySetAsSeries(lda_116, TRUE);
      ArraySetAsSeries(lda_120, TRUE);
      if (li_100) {
         RefreshRates();
         for (int li_144 = 0; li_144 < li_184; li_144++) lda_112[li_144] = iMA(a_symbol_4, a_timeframe_12, 5, 0, MODE_SMA, PRICE_MEDIAN, li_144) - iMA(a_symbol_4, a_timeframe_12, 34, 0, MODE_SMA, PRICE_MEDIAN, li_144);
         for (li_144 = 0; li_144 < li_184; li_144++) lda_116[li_144] = iMAOnArray(lda_112, li_184, 5, 0, MODE_SMA, li_144);
         return (lda_112[ai_16] - lda_116[ai_16]);
      }
      for (li_144 = 0; li_144 < li_184; li_144++) lda_112[li_144] = iMA(NULL, 0, 5, 0, MODE_SMA, PRICE_MEDIAN, li_144) - iMA(NULL, 0, 34, 0, MODE_SMA, PRICE_MEDIAN, li_144);
      for (li_144 = 0; li_144 < li_184; li_144++) lda_116[li_144] = iMAOnArray(lda_112, li_184, 5, 0, MODE_SMA, li_144);
      return (lda_112[ai_16] - lda_116[ai_16]);
   case 44:
      ArrayResize(lda_136, li_188);
      ArraySetAsSeries(lda_136, TRUE);
      li_144 = li_188 - 1;
      if (li_100) {
         RefreshRates();
         while (li_144 >= 0) {
            l_ihigh_192 = iHigh(a_symbol_4, a_timeframe_12, li_144);
            l_ilow_208 = iLow(a_symbol_4, a_timeframe_12, li_144);
            l_iopen_200 = iOpen(a_symbol_4, a_timeframe_12, li_144);
            l_iclose_216 = iClose(a_symbol_4, a_timeframe_12, li_144);
            lda_136[li_144] = l_iclose_216 - l_ilow_208 - (l_ihigh_192 - l_iclose_216);
            if (lda_136[li_144] != 0.0) {
               ld_224 = l_ihigh_192 - l_ilow_208;
               if (ld_224 == 0.0) lda_136[li_144] = 0;
               else {
                  lda_136[li_144] = lda_136[li_144] / ld_224;
                  lda_136[li_144] = lda_136[li_144] * iVolume(a_symbol_4, a_timeframe_12, li_144);
               }
            }
            if (li_144 < li_188 - 1) lda_136[li_144] += (lda_136[li_144 + 1]);
            li_144--;
         }
         return (lda_136[ai_16]);
      }
      while (li_144 >= 0) {
         l_ihigh_192 = High[li_144];
         l_ilow_208 = Low[li_144];
         l_iopen_200 = Open[li_144];
         l_iclose_216 = Close[li_144];
         lda_136[li_144] = l_iclose_216 - l_ilow_208 - (l_ihigh_192 - l_iclose_216);
         if (lda_136[li_144] != 0.0) {
            ld_224 = l_ihigh_192 - l_ilow_208;
            if (ld_224 == 0.0) lda_136[li_144] = 0;
            else {
               lda_136[li_144] = lda_136[li_144] / ld_224;
               lda_136[li_144] = lda_136[li_144] * Volume[li_144];
            }
         }
         if (li_144 < li_188 - 1) lda_136[li_144] += (lda_136[li_144 + 1]);
         li_144--;
      }
      return (lda_136[ai_16]);
   case 45:
      ArraySetAsSeries(lda_104, TRUE);
      ArraySetAsSeries(lda_108, TRUE);
      ArraySetAsSeries(lda_112, TRUE);
      if (li_100) {
         RefreshRates();
         for (li_144 = 0; li_144 < li_184; li_144++) {
            lda_104[li_144] = iMA(a_symbol_4, a_timeframe_12, a_period_20, ad_28, a_ma_method_68, a_applied_price_76, li_144);
            lda_108[li_144] = iMA(a_symbol_4, a_timeframe_12, a_period_36, ad_44, a_ma_method_68, a_applied_price_76, li_144);
            lda_112[li_144] = iMA(a_symbol_4, a_timeframe_12, a_period_52, ad_60, a_ma_method_68, a_applied_price_76, li_144);
         }
         if (ad_84 == 1.0) return (lda_104[ai_16]);
         if (ad_84 == 2.0) return (lda_108[ai_16]);
         if (ad_84 != 3.0) break;
         return (lda_112[ai_16]);
      }
      for (li_144 = 0; li_144 < li_184; li_144++) {
         lda_104[li_144] = iMA(NULL, 0, a_period_20, ad_28, a_ma_method_68, a_applied_price_76, li_144);
         lda_108[li_144] = iMA(NULL, 0, a_period_36, ad_44, a_ma_method_68, a_applied_price_76, li_144);
         lda_112[li_144] = iMA(NULL, 0, a_period_52, ad_60, a_ma_method_68, a_applied_price_76, li_144);
      }
      if (ad_84 == 1.0) return (lda_104[ai_16]);
      if (ad_84 == 2.0) return (lda_108[ai_16]);
      if (ad_84 == 3.0) return (lda_112[ai_16]);
      break;
   case 46:
      ArraySetAsSeries(lda_104, TRUE);
      ArraySetAsSeries(lda_108, TRUE);
      ArraySetAsSeries(lda_112, TRUE);
      ArraySetAsSeries(lda_116, TRUE);
      ArraySetAsSeries(lda_120, TRUE);
      ArraySetAsSeries(lda_124, TRUE);
      li_144 = 500;
      li_148 = li_144;
      lda_116[li_144 + 1] = 0;
      lda_120[li_144 + 1] = 0;
      if (li_100) {
         RefreshRates();
         while (li_144 >= 0) {
            ld_256 = iLow(a_symbol_4, a_timeframe_12, li_144);
            ld_248 = iHigh(a_symbol_4, a_timeframe_12, li_144);
            ld_224 = ld_248 - iHigh(a_symbol_4, a_timeframe_12, li_144 + 1);
            ld_232 = iLow(a_symbol_4, a_timeframe_12, li_144 + 1) - ld_256;
            if (ld_224 < 0.0) ld_224 = 0;
            if (ld_232 < 0.0) ld_232 = 0;
            if (ld_224 == ld_232) {
               ld_224 = 0;
               ld_232 = 0;
            } else {
               if (ld_224 < ld_232) ld_224 = 0;
               else
                  if (ld_232 < ld_224) ld_232 = 0;
            }
            if (ad_28 == 0.0) ld_264 = iClose(a_symbol_4, a_timeframe_12, li_144 + 1);
            if (ad_28 == 1.0) ld_264 = iOpen(a_symbol_4, a_timeframe_12, li_144 + 1);
            if (ad_28 == 2.0) ld_264 = iHigh(a_symbol_4, a_timeframe_12, li_144 + 1);
            if (ad_28 == 3.0) ld_264 = iLow(a_symbol_4, a_timeframe_12, li_144 + 1);
            if (ad_28 == 4.0) ld_264 = (iHigh(a_symbol_4, a_timeframe_12, li_144 + 1) + iLow(a_symbol_4, a_timeframe_12, li_144 + 1)) / 2.0;
            if (ad_28 == 5.0) ld_264 = (iHigh(a_symbol_4, a_timeframe_12, li_144 + 1) + iLow(a_symbol_4, a_timeframe_12, li_144 + 1) + iClose(a_symbol_4, a_timeframe_12, li_144 + 1)) / 3.0;
            if (ad_28 == 6.0) {
               ld_264 = (iHigh(a_symbol_4, a_timeframe_12, li_144 + 1) + iLow(a_symbol_4, a_timeframe_12, li_144 + 1) + iClose(a_symbol_4, a_timeframe_12, li_144 + 1) + iClose(a_symbol_4, a_timeframe_12, li_144 +
                  1)) / 4.0;
            }
            ld_272 = MathAbs(ld_248 - ld_256);
            ld_280 = MathAbs(ld_248 - ld_264);
            ld_288 = MathAbs(ld_256 - ld_264);
            ld_240 = MathMax(ld_272, ld_280);
            ld_240 = MathMax(ld_240, ld_288);
            if (ld_240 == 0.0) {
               lda_116[li_144] = 0;
               lda_120[li_144] = 0;
            } else {
               lda_116[li_144] = 100.0 * ld_224 / ld_240;
               lda_120[li_144] = 100.0 * ld_232 / ld_240;
            }
            li_144--;
         }
         for (li_144 = 0; li_144 <= li_184; li_144++) lda_108[li_144] = iMAOnArray(lda_116, li_184, a_period_20, 0, MODE_EMA, li_144);
         for (li_144 = 0; li_144 <= li_184; li_144++) lda_112[li_144] = iMAOnArray(lda_120, li_184, a_period_20, 0, MODE_EMA, li_144);
         lda_124[li_144 + 1] = 0;
         for (li_144 = li_148; li_144 >= 0; li_144--) {
            ld_296 = MathAbs(lda_108[li_144] + lda_112[li_144]);
            if (ld_296 == 0.0) lda_124[li_144] = 0;
            else lda_124[li_144] = 100.0 * (MathAbs(lda_108[li_144] - lda_112[li_144]) / ld_296);
         }
         for (li_144 = 0; li_144 <= li_184; li_144++) lda_104[li_144] = iMAOnArray(lda_124, li_184, a_period_20, 0, MODE_EMA, li_144);
         if (a_period_36 == 0.0) return (lda_104[ai_16]);
         if (a_period_36 == 1.0) return (lda_108[ai_16]);
         if (a_period_36 != 2.0) break;
         return (lda_112[ai_16]);
      }
      while (li_144 >= 0) {
         ld_256 = Low[li_144];
         ld_248 = High[li_144];
         ld_224 = ld_248 - (High[li_144 + 1]);
         ld_232 = Low[li_144 + 1] - ld_256;
         if (ld_224 < 0.0) ld_224 = 0;
         if (ld_232 < 0.0) ld_232 = 0;
         if (ld_224 == ld_232) {
            ld_224 = 0;
            ld_232 = 0;
         } else {
            if (ld_224 < ld_232) ld_224 = 0;
            else
               if (ld_232 < ld_224) ld_232 = 0;
         }
         if (ad_28 == 0.0) ld_264 = Close[li_144 + 1];
         if (ad_28 == 1.0) ld_264 = Open[li_144 + 1];
         if (ad_28 == 2.0) ld_264 = High[li_144 + 1];
         if (ad_28 == 3.0) ld_264 = Low[li_144 + 1];
         if (ad_28 == 4.0) ld_264 = (High[li_144 + 1] + (Low[li_144 + 1])) / 2.0;
         if (ad_28 == 5.0) ld_264 = (High[li_144 + 1] + (Low[li_144 + 1]) + (Close[li_144 + 1])) / 3.0;
         if (ad_28 == 6.0) ld_264 = (High[li_144 + 1] + (Low[li_144 + 1]) + (Close[li_144 + 1]) + (Close[li_144 + 1])) / 4.0;
         ld_272 = MathAbs(ld_248 - ld_256);
         ld_280 = MathAbs(ld_248 - ld_264);
         ld_288 = MathAbs(ld_256 - ld_264);
         ld_240 = MathMax(ld_272, ld_280);
         ld_240 = MathMax(ld_240, ld_288);
         if (ld_240 == 0.0) {
            lda_116[li_144] = 0;
            lda_120[li_144] = 0;
         } else {
            lda_116[li_144] = 100.0 * ld_224 / ld_240;
            lda_120[li_144] = 100.0 * ld_232 / ld_240;
         }
         li_144--;
      }
      for (li_144 = 0; li_144 <= li_184; li_144++) lda_108[li_144] = iMAOnArray(lda_116, li_184, a_period_20, 0, MODE_EMA, li_144);
      for (li_144 = 0; li_144 <= li_184; li_144++) lda_112[li_144] = iMAOnArray(lda_120, li_184, a_period_20, 0, MODE_EMA, li_144);
      lda_124[li_144 + 1] = 0;
      for (li_144 = li_148; li_144 >= 0; li_144--) {
         ld_296 = MathAbs(lda_108[li_144] + lda_112[li_144]);
         if (ld_296 == 0.0) lda_124[li_144] = 0;
         else lda_124[li_144] = 100.0 * (MathAbs(lda_108[li_144] - lda_112[li_144]) / ld_296);
      }
      for (li_144 = 0; li_144 <= li_184; li_144++) lda_104[li_144] = iMAOnArray(lda_124, li_184, a_period_20, 0, MODE_EMA, li_144);
      if (a_period_36 == 0.0) return (lda_104[ai_16]);
      if (a_period_36 == 1.0) return (lda_108[ai_16]);
      if (a_period_36 == 2.0) return (lda_112[ai_16]);
      break;
   case 47:
      ArraySetAsSeries(lda_104, TRUE);
      ArraySetAsSeries(lda_108, TRUE);
      if (li_100) {
         RefreshRates();
         for (li_144 = 500; li_144 >= 0; li_144--) {
            l_ihigh_192 = iHigh(a_symbol_4, a_timeframe_12, li_144);
            l_ilow_208 = iLow(a_symbol_4, a_timeframe_12, li_144);
            if (li_144 == 499) lda_108[li_144] = l_ihigh_192 - l_ilow_208;
            else {
               ld_224 = iClose(a_symbol_4, a_timeframe_12, li_144 + 1);
               lda_108[li_144] = MathMax(l_ihigh_192, ld_224) - MathMin(l_ilow_208, ld_224);
            }
         }
         for (li_144 = 0; li_144 < li_184; li_144++) lda_104[li_144] = iMAOnArray(lda_108, 500, a_period_20, 0, MODE_SMA, li_144);
         return (lda_104[ai_16]);
      }
      for (li_144 = 500; li_144 >= 0; li_144--) {
         l_ihigh_192 = High[li_144];
         l_ilow_208 = Low[li_144];
         if (li_144 == 499) lda_108[li_144] = l_ihigh_192 - l_ilow_208;
         else {
            ld_224 = Close[li_144 + 1];
            lda_108[li_144] = MathMax(l_ihigh_192, ld_224) - MathMin(l_ilow_208, ld_224);
         }
      }
      for (li_144 = 0; li_144 < li_184; li_144++) lda_104[li_144] = iMAOnArray(lda_108, 500, a_period_20, 0, MODE_SMA, li_144);
      return (lda_104[ai_16]);
   case 48:
      ArraySetAsSeries(lda_104, TRUE);
      ArraySetAsSeries(lda_108, TRUE);
      ArraySetAsSeries(lda_112, TRUE);
      if (li_100) {
         RefreshRates();
         for (li_144 = 0; li_144 < li_184; li_144++) lda_104[li_144] = iMA(a_symbol_4, a_timeframe_12, 5, 0, MODE_SMA, PRICE_MEDIAN, li_144) - iMA(a_symbol_4, a_timeframe_12, 34, 0, MODE_SMA, PRICE_MEDIAN, li_144);
         li_328 = TRUE;
         for (li_144 = li_184 - 1; li_144 >= 0; li_144--) {
            ld_240 = lda_104[li_144];
            ld_224 = lda_104[li_144 + 1];
            if (ld_240 > ld_224) li_328 = TRUE;
            if (ld_240 < ld_232) li_328 = FALSE;
            if (!li_328) {
               lda_112[li_144] = ld_240;
               lda_108[li_144] = 0.0;
            } else {
               lda_108[li_144] = ld_240;
               lda_112[li_144] = 0.0;
            }
         }
         return (lda_104[ai_16]);
      }
      for (li_144 = 0; li_144 < li_184; li_144++) lda_104[li_144] = iMA(NULL, 0, 5, 0, MODE_SMA, PRICE_MEDIAN, li_144) - iMA(NULL, 0, 34, 0, MODE_SMA, PRICE_MEDIAN, li_144);
      li_328 = TRUE;
      for (li_144 = li_184 - 1; li_144 >= 0; li_144--) {
         ld_240 = lda_104[li_144];
         ld_224 = lda_104[li_144 + 1];
         if (ld_240 > ld_224) li_328 = TRUE;
         if (ld_240 < ld_232) li_328 = FALSE;
         if (!li_328) {
            lda_112[li_144] = ld_240;
            lda_108[li_144] = 0.0;
         } else {
            lda_108[li_144] = ld_240;
            lda_112[li_144] = 0.0;
         }
      }
      return (lda_104[ai_16]);
   case 49:
      ArraySetAsSeries(lda_104, TRUE);
      ArraySetAsSeries(lda_108, TRUE);
      if (li_100) {
         RefreshRates();
         for (li_144 = 0; li_144 < li_184; li_144++) lda_104[li_144] = iMA(a_symbol_4, a_timeframe_12, a_period_20, 0, MODE_EMA, ad_28, li_144);
         for (li_144 = 500; li_144 >= 0; li_144--) lda_108[li_144] = iLow(a_symbol_4, a_timeframe_12, li_144) - lda_104[li_144];
         return (lda_108[ai_16]);
      }
      for (li_144 = 0; li_144 < li_184; li_144++) lda_104[li_144] = iMA(NULL, 0, a_period_20, 0, MODE_EMA, ad_28, li_144);
      for (li_144 = 500; li_144 >= 0; li_144--) lda_108[li_144] = Low[li_144] - lda_104[li_144];
      return (lda_108[ai_16]);
   case 50:
      ArraySetAsSeries(lda_104, TRUE);
      ArraySetAsSeries(lda_108, TRUE);
      ArraySetAsSeries(lda_112, TRUE);
      if (li_100) {
         RefreshRates();
         for (li_144 = 0; li_144 < li_184; li_144++) lda_104[li_144] = iMA(a_symbol_4, a_timeframe_12, a_period_20, a_period_36, MODE_SMA, ad_44, li_144);
         for (li_144 = li_184 - a_period_20 + 1.0; li_144 >= 0; li_144--) {
            ld_232 = 0.0;
            li_148 = li_144 + a_period_20 - 1.0;
            ld_240 = lda_104[li_144];
            while (li_148 >= li_144) {
               if (ad_44 == 0.0) ld_248 = iClose(a_symbol_4, a_timeframe_12, li_148) - ld_240;
               if (ad_44 == 1.0) ld_248 = iOpen(a_symbol_4, a_timeframe_12, li_148) - ld_240;
               if (ad_44 == 2.0) ld_248 = iHigh(a_symbol_4, a_timeframe_12, li_148) - ld_240;
               if (ad_44 == 3.0) ld_248 = iLow(a_symbol_4, a_timeframe_12, li_148) - ld_240;
               if (ad_44 == 4.0) ld_248 = (iHigh(a_symbol_4, a_timeframe_12, li_148) + iLow(a_symbol_4, a_timeframe_12, li_148)) / 2.0 - ld_240;
               if (ad_44 == 5.0) ld_248 = (iHigh(a_symbol_4, a_timeframe_12, li_148) + iLow(a_symbol_4, a_timeframe_12, li_148) + iClose(a_symbol_4, a_timeframe_12, li_148)) / 3.0 - ld_240;
               if (ad_44 == 6.0) ld_248 = (iHigh(a_symbol_4, a_timeframe_12, li_148) + iLow(a_symbol_4, a_timeframe_12, li_148) + iClose(a_symbol_4, a_timeframe_12, li_148) + iClose(a_symbol_4, a_timeframe_12, li_148)) / 4.0 - ld_240;
               ld_232 += ld_248 * ld_248;
               li_148--;
            }
            ld_224 = ad_28 * MathSqrt(ld_232 / a_period_20);
            lda_108[li_144] = ld_240 + ld_224;
            lda_112[li_144] = ld_240 - ld_224;
         }
         if (a_period_52 == 1.0) return (lda_108[ai_16]);
         if (a_period_52 != 2.0) break;
         return (lda_112[ai_16]);
      }
      for (li_144 = 0; li_144 < li_184; li_144++) lda_104[li_144] = iMA(NULL, 0, a_period_20, a_period_36, MODE_SMA, ad_44, li_144);
      for (li_144 = li_184 - a_period_20 + 1.0; li_144 >= 0; li_144--) {
         ld_232 = 0.0;
         li_148 = li_144 + a_period_20 - 1.0;
         ld_240 = lda_104[li_144];
         while (li_148 >= li_144) {
            if (ad_44 == 0.0) ld_248 = Close[li_148] - ld_240;
            if (ad_44 == 1.0) ld_248 = Open[li_148] - ld_240;
            if (ad_44 == 2.0) ld_248 = High[li_148] - ld_240;
            if (ad_44 == 3.0) ld_248 = Low[li_148] - ld_240;
            if (ad_44 == 4.0) ld_248 = (High[li_148] + Low[li_148]) / 2.0 - ld_240;
            if (ad_44 == 5.0) ld_248 = (High[li_148] + Low[li_148] + Close[li_148]) / 3.0 - ld_240;
            if (ad_44 == 6.0) ld_248 = (High[li_148] + Low[li_148] + Close[li_148] + Close[li_148]) / 4.0 - ld_240;
            ld_232 += ld_248 * ld_248;
            li_148--;
         }
         ld_224 = ad_28 * MathSqrt(ld_232 / a_period_20);
         lda_108[li_144] = ld_240 + ld_224;
         lda_112[li_144] = ld_240 - ld_224;
      }
      if (a_period_52 == 1.0) return (lda_108[ai_16]);
      if (a_period_52 == 2.0) return (lda_112[ai_16]);
      break;
   case 51:
      ArraySetAsSeries(lda_104, TRUE);
      ArraySetAsSeries(lda_108, TRUE);
      if (li_100) {
         RefreshRates();
         for (li_144 = 0; li_144 < li_184; li_144++) lda_104[li_144] = iMA(a_symbol_4, a_timeframe_12, a_period_20, 0, MODE_EMA, ad_28, li_144);
         for (li_144 = 500; li_144 >= 0; li_144--) lda_108[li_144] = iHigh(a_symbol_4, a_timeframe_12, li_144) - lda_104[li_144];
         return (lda_108[ai_16]);
      }
      for (li_144 = 0; li_144 < li_184; li_144++) lda_104[li_144] = iMA(NULL, 0, a_period_20, 0, MODE_EMA, ad_28, li_144);
      for (li_144 = 500; li_144 >= 0; li_144--) lda_108[li_144] = High[li_144] - lda_104[li_144];
      return (lda_108[ai_16]);
   case 52:
      ArraySetAsSeries(lda_104, TRUE);
      ArraySetAsSeries(lda_108, TRUE);
      ArraySetAsSeries(lda_112, TRUE);
      ArraySetAsSeries(lda_116, TRUE);
      if (li_100) {
         RefreshRates();
         for (li_144 = 0; li_144 < li_184; li_144++) lda_104[li_144] = iMA(a_symbol_4, a_timeframe_12, a_period_20, 0, MODE_SMA, ad_28, li_144);
         li_144 = 500 - a_period_20 + 1.0;
         ld_240 = 0.015 / a_period_20;
         while (li_144 >= 0) {
            ld_232 = 0.0;
            for (li_148 = li_144 + a_period_20 - 1.0; li_148 >= li_144; li_148--) {
               if (ad_28 == 0.0) ld_224 = iClose(a_symbol_4, a_timeframe_12, li_148);
               if (ad_28 == 1.0) ld_224 = iOpen(a_symbol_4, a_timeframe_12, li_148);
               if (ad_28 == 2.0) ld_224 = iHigh(a_symbol_4, a_timeframe_12, li_148);
               if (ad_28 == 3.0) ld_224 = iLow(a_symbol_4, a_timeframe_12, li_148);
               if (ad_28 == 4.0) ld_224 = (iHigh(a_symbol_4, a_timeframe_12, li_148) + iLow(a_symbol_4, a_timeframe_12, li_148)) / 2.0;
               if (ad_28 == 5.0) ld_224 = (iHigh(a_symbol_4, a_timeframe_12, li_148) + iLow(a_symbol_4, a_timeframe_12, li_148) + iClose(a_symbol_4, a_timeframe_12, li_148)) / 3.0;
               if (ad_28 == 6.0) ld_224 = (iHigh(a_symbol_4, a_timeframe_12, li_148) + iLow(a_symbol_4, a_timeframe_12, li_148) + iClose(a_symbol_4, a_timeframe_12, li_148) + iClose(a_symbol_4, a_timeframe_12, li_148)) / 4.0;
               ld_232 += MathAbs(ld_224 - lda_104[li_144]);
            }
            lda_108[li_144] = ld_232 * ld_240;
            li_144--;
         }
         for (li_144 = 500 - a_period_20 + 1.0; li_144 >= 0; li_144--) {
            if (ad_28 == 0.0) ld_224 = iClose(a_symbol_4, a_timeframe_12, li_144);
            if (ad_28 == 1.0) ld_224 = iOpen(a_symbol_4, a_timeframe_12, li_144);
            if (ad_28 == 2.0) ld_224 = iHigh(a_symbol_4, a_timeframe_12, li_144);
            if (ad_28 == 3.0) ld_224 = iLow(a_symbol_4, a_timeframe_12, li_144);
            if (ad_28 == 4.0) ld_224 = (iHigh(a_symbol_4, a_timeframe_12, li_144) + iLow(a_symbol_4, a_timeframe_12, li_144)) / 2.0;
            if (ad_28 == 5.0) ld_224 = (iHigh(a_symbol_4, a_timeframe_12, li_144) + iLow(a_symbol_4, a_timeframe_12, li_144) + iClose(a_symbol_4, a_timeframe_12, li_144)) / 3.0;
            if (ad_28 == 6.0) ld_224 = (iHigh(a_symbol_4, a_timeframe_12, li_144) + iLow(a_symbol_4, a_timeframe_12, li_144) + iClose(a_symbol_4, a_timeframe_12, li_144) + iClose(a_symbol_4, a_timeframe_12, li_144)) / 4.0;
            lda_112[li_144] = ld_224 - lda_104[li_144];
         }
         for (li_144 = 500 - a_period_20 + 1.0; li_144 >= 0; li_144--) {
            if (lda_108[li_144] == 0.0) lda_116[li_144] = 0.0;
            else lda_116[li_144] = lda_112[li_144] / lda_108[li_144];
         }
         return (lda_116[ai_16]);
      }
      for (li_144 = 0; li_144 < li_184; li_144++) lda_104[li_144] = iMA(NULL, 0, a_period_20, 0, MODE_SMA, ad_28, li_144);
      li_144 = 500 - a_period_20 + 1.0;
      ld_240 = 0.015 / a_period_20;
      while (li_144 >= 0) {
         ld_232 = 0.0;
         for (li_148 = li_144 + a_period_20 - 1.0; li_148 >= li_144; li_148--) {
            if (ad_28 == 0.0) ld_224 = Close[li_148];
            if (ad_28 == 1.0) ld_224 = Open[li_148];
            if (ad_28 == 2.0) ld_224 = High[li_148];
            if (ad_28 == 3.0) ld_224 = Low[li_148];
            if (ad_28 == 4.0) ld_224 = (High[li_148] + Low[li_148]) / 2.0;
            if (ad_28 == 5.0) ld_224 = (High[li_148] + Low[li_148] + Close[li_148]) / 3.0;
            if (ad_28 == 6.0) ld_224 = (High[li_148] + Low[li_148] + Close[li_148] + Close[li_148]) / 4.0;
            ld_232 += MathAbs(ld_224 - lda_104[li_144]);
         }
         lda_108[li_144] = ld_232 * ld_240;
         li_144--;
      }
      for (li_144 = 500 - a_period_20 + 1.0; li_144 >= 0; li_144--) {
         if (ad_28 == 0.0) ld_224 = Close[li_144];
         if (ad_28 == 1.0) ld_224 = Open[li_144];
         if (ad_28 == 2.0) ld_224 = High[li_144];
         if (ad_28 == 3.0) ld_224 = Low[li_144];
         if (ad_28 == 4.0) ld_224 = (High[li_144] + Low[li_144]) / 2.0;
         if (ad_28 == 5.0) ld_224 = (High[li_144] + Low[li_144] + Close[li_144]) / 3.0;
         if (ad_28 == 6.0) ld_224 = (High[li_144] + Low[li_144] + Close[li_144] + Close[li_144]) / 4.0;
         lda_112[li_144] = ld_224 - lda_104[li_144];
      }
      for (li_144 = 500 - a_period_20 + 1.0; li_144 >= 0; li_144--) {
         if (lda_108[li_144] == 0.0) lda_116[li_144] = 0.0;
         else lda_116[li_144] = lda_112[li_144] / lda_108[li_144];
      }
      return (lda_116[ai_16]);
   case 53:
      ArraySetAsSeries(lda_104, TRUE);
      ArraySetAsSeries(lda_108, TRUE);
      ArraySetAsSeries(lda_112, TRUE);
      ArraySetAsSeries(lda_116, TRUE);
      if (li_100) {
         RefreshRates();
         for (li_144 = 500; li_144 >= 0; li_144--) {
            ld_224 = (lda_112[li_144 + 1] + (lda_116[li_144 + 1])) / 2.0;
            ld_248 = (iOpen(a_symbol_4, a_timeframe_12, li_144) + iHigh(a_symbol_4, a_timeframe_12, li_144) + iLow(a_symbol_4, a_timeframe_12, li_144) + iClose(a_symbol_4, a_timeframe_12, li_144)) / 4.0;
            ld_232 = MathMax(iHigh(a_symbol_4, a_timeframe_12, li_144), MathMax(ld_224, ld_248));
            ld_240 = MathMin(iLow(a_symbol_4, a_timeframe_12, li_144), MathMin(ld_224, ld_248));
            if (ld_224 < ld_248) {
               lda_104[li_144] = ld_240;
               lda_108[li_144] = ld_232;
            } else {
               lda_104[li_144] = ld_232;
               lda_108[li_144] = ld_240;
            }
            lda_112[li_144] = ld_224;
            lda_116[li_144] = ld_248;
         }
         if (a_period_20 == 0.0) return (lda_104[ai_16]);
         if (a_period_20 == 1.0) return (lda_108[ai_16]);
         if (a_period_20 == 2.0) return (lda_112[ai_16]);
         if (a_period_20 != 3.0) break;
         return (lda_116[ai_16]);
      }
      for (li_144 = 500; li_144 >= 0; li_144--) {
         ld_224 = (lda_112[li_144 + 1] + (lda_116[li_144 + 1])) / 2.0;
         ld_248 = (Open[li_144] + High[li_144] + Low[li_144] + Close[li_144]) / 4.0;
         ld_232 = MathMax(High[li_144], MathMax(ld_224, ld_248));
         ld_240 = MathMin(Low[li_144], MathMin(ld_224, ld_248));
         if (ld_224 < ld_248) {
            lda_104[li_144] = ld_240;
            lda_108[li_144] = ld_232;
         } else {
            lda_104[li_144] = ld_232;
            lda_108[li_144] = ld_240;
         }
         lda_112[li_144] = ld_224;
         lda_116[li_144] = ld_248;
      }
      if (a_period_20 == 0.0) return (lda_104[ai_16]);
      if (a_period_20 == 1.0) return (lda_108[ai_16]);
      if (a_period_20 == 2.0) return (lda_112[ai_16]);
      if (a_period_20 == 3.0) return (lda_116[ai_16]);
      break;
   case 54:
      ArraySetAsSeries(lda_104, TRUE);
      ArraySetAsSeries(lda_108, TRUE);
      ArraySetAsSeries(lda_112, TRUE);
      ArraySetAsSeries(lda_116, TRUE);
      ArraySetAsSeries(lda_120, TRUE);
      ArraySetAsSeries(lda_124, TRUE);
      ArraySetAsSeries(lda_128, TRUE);
      if (li_100) {
         RefreshRates();
         li_148 = ad_28;
         li_156 = ad_28;
         if (li_156 < a_period_20) li_156 = a_period_20;
         for (li_144 = 500 - a_period_20; li_144 >= 0; li_144--) {
            l_ihigh_192 = iHigh(a_symbol_4, a_timeframe_12, li_144);
            l_ilow_208 = iLow(a_symbol_4, a_timeframe_12, li_144);
            for (int li_152 = li_144 - 1 + a_period_20; li_152 >= li_144; li_152--) {
               ld_224 = iHigh(a_symbol_4, a_timeframe_12, li_152);
               if (l_ihigh_192 < ld_224) l_ihigh_192 = ld_224;
               ld_224 = iLow(a_symbol_4, a_timeframe_12, li_152);
               if (l_ilow_208 > ld_224) l_ilow_208 = ld_224;
            }
            lda_104[li_144] = (l_ihigh_192 + l_ilow_208) / 2.0;
         }
         for (li_144 = 500 - ad_28; li_144 >= 0; li_144--) {
            l_ihigh_192 = iHigh(a_symbol_4, a_timeframe_12, li_144);
            l_ilow_208 = iLow(a_symbol_4, a_timeframe_12, li_144);
            for (li_152 = li_144 - 1 + ad_28; li_152 >= li_144; li_152--) {
               ld_224 = iHigh(a_symbol_4, a_timeframe_12, li_152);
               if (l_ihigh_192 < ld_224) l_ihigh_192 = ld_224;
               ld_224 = iLow(a_symbol_4, a_timeframe_12, li_152);
               if (l_ilow_208 > ld_224) l_ilow_208 = ld_224;
            }
            lda_108[li_144] = (l_ihigh_192 + l_ilow_208) / 2.0;
         }
         for (li_144 = 500 - li_156 + 1; li_144 >= 0; li_144--) {
            ld_224 = (lda_108[li_144] + lda_104[li_144]) / 2.0;
            lda_112[li_144] = ld_224;
            lda_124[li_144] = ld_224;
         }
         for (li_144 = 500 - a_period_36; li_144 >= 0; li_144--) {
            l_ihigh_192 = iHigh(a_symbol_4, a_timeframe_12, li_144);
            l_ilow_208 = iLow(a_symbol_4, a_timeframe_12, li_144);
            for (li_152 = li_144 - 1 + a_period_36; li_152 >= li_144; li_152--) {
               ld_224 = iHigh(a_symbol_4, a_timeframe_12, li_152);
               if (l_ihigh_192 < ld_224) l_ihigh_192 = ld_224;
               ld_224 = iLow(a_symbol_4, a_timeframe_12, li_152);
               if (l_ilow_208 > ld_224) l_ilow_208 = ld_224;
            }
            ld_224 = (l_ihigh_192 + l_ilow_208) / 2.0;
            lda_116[li_144] = ld_224;
            lda_128[li_144] = ld_224;
         }
         for (li_144 = 499; li_144 >= 0; li_144--) lda_120[li_144] = iClose(a_symbol_4, a_timeframe_12, li_144);
         if (ad_44 == 1.0) return (lda_104[ai_16]);
         if (ad_44 == 2.0) return (lda_108[ai_16]);
         if (ad_44 == 3.0) return (lda_112[ai_16 + li_148]);
         if (ad_44 == 4.0) return (lda_116[ai_16 + li_148]);
         if (ad_44 != 5.0) break;
         return (lda_120[ai_16 - li_148]);
      }
      li_148 = ad_28;
      li_156 = ad_28;
      if (li_156 < a_period_20) li_156 = a_period_20;
      for (li_144 = 500 - a_period_20; li_144 >= 0; li_144--) {
         l_ihigh_192 = High[li_144];
         l_ilow_208 = Low[li_144];
         for (li_152 = li_144 - 1 + a_period_20; li_152 >= li_144; li_152--) {
            ld_224 = High[li_152];
            if (l_ihigh_192 < ld_224) l_ihigh_192 = ld_224;
            ld_224 = Low[li_152];
            if (l_ilow_208 > ld_224) l_ilow_208 = ld_224;
         }
         lda_104[li_144] = (l_ihigh_192 + l_ilow_208) / 2.0;
      }
      for (li_144 = 500 - ad_28; li_144 >= 0; li_144--) {
         l_ihigh_192 = High[li_144];
         l_ilow_208 = Low[li_144];
         for (li_152 = li_144 - 1 + ad_28; li_152 >= li_144; li_152--) {
            ld_224 = High[li_152];
            if (l_ihigh_192 < ld_224) l_ihigh_192 = ld_224;
            ld_224 = Low[li_152];
            if (l_ilow_208 > ld_224) l_ilow_208 = ld_224;
         }
         lda_108[li_144] = (l_ihigh_192 + l_ilow_208) / 2.0;
      }
      for (li_144 = 500 - li_156 + 1; li_144 >= 0; li_144--) {
         ld_224 = (lda_108[li_144] + lda_104[li_144]) / 2.0;
         lda_112[li_144] = ld_224;
         lda_124[li_144] = ld_224;
      }
      for (li_144 = 500 - a_period_36; li_144 >= 0; li_144--) {
         l_ihigh_192 = High[li_144];
         l_ilow_208 = Low[li_144];
         for (li_152 = li_144 - 1 + a_period_36; li_152 >= li_144; li_152--) {
            ld_224 = High[li_152];
            if (l_ihigh_192 < ld_224) l_ihigh_192 = ld_224;
            ld_224 = Low[li_152];
            if (l_ilow_208 > ld_224) l_ilow_208 = ld_224;
         }
         ld_224 = (l_ihigh_192 + l_ilow_208) / 2.0;
         lda_116[li_144] = ld_224;
         lda_128[li_144] = ld_224;
      }
      for (li_144 = 499; li_144 >= 0; li_144--) lda_120[li_144] = Close[li_144];
      if (ad_44 == 1.0) return (lda_104[ai_16]);
      if (ad_44 == 2.0) return (lda_108[ai_16]);
      if (ad_44 == 3.0) return (lda_112[ai_16 + li_148]);
      if (ad_44 == 4.0) return (lda_116[ai_16 + li_148]);
      if (ad_44 == 5.0) return (lda_120[ai_16 - li_148]);
      break;
   case 55:
      ArraySetAsSeries(lda_104, TRUE);
      ArraySetAsSeries(lda_108, TRUE);
      if (li_100) {
         RefreshRates();
         for (li_144 = 0; li_144 < li_184; li_144++) lda_104[li_144] = iMA(a_symbol_4, a_timeframe_12, a_period_20, 0, MODE_EMA, PRICE_CLOSE, li_144) - iMA(a_symbol_4, a_timeframe_12, ad_28, 0, MODE_EMA, ad_44, li_144);
         for (li_144 = 0; li_144 < li_184; li_144++) lda_108[li_144] = iMAOnArray(lda_104, li_184, a_period_36, 0, MODE_SMA, li_144);
         if (a_period_52 == 0.0) return (lda_104[ai_16]);
         if (a_period_52 != 1.0) break;
         return (lda_108[ai_16]);
      }
      for (li_144 = 0; li_144 < li_184; li_144++) lda_104[li_144] = iMA(NULL, 0, a_period_20, 0, MODE_EMA, PRICE_CLOSE, li_144) - iMA(NULL, 0, ad_28, 0, MODE_EMA, ad_44, li_144);
      for (li_144 = 0; li_144 < li_184; li_144++) lda_108[li_144] = iMAOnArray(lda_104, li_184, a_period_36, 0, MODE_SMA, li_144);
      if (a_period_52 == 0.0) return (lda_104[ai_16]);
      if (a_period_52 == 1.0) return (lda_108[ai_16]);
      break;
   case 56:
      ArraySetAsSeries(lda_104, TRUE);
      if (li_100) {
         RefreshRates();
         li_148 = a_period_20;
         for (li_144 = 500 - a_period_20 - 1.0; li_144 >= 0; li_144--) {
            if (ad_28 == 0.0) lda_104[li_144] = 100.0 * iClose(a_symbol_4, a_timeframe_12, li_144) / iClose(a_symbol_4, a_timeframe_12, li_144 + li_148);
            if (ad_28 == 1.0) lda_104[li_144] = 100.0 * iOpen(a_symbol_4, a_timeframe_12, li_144) / iOpen(a_symbol_4, a_timeframe_12, li_144 + li_148);
            if (ad_28 == 2.0) lda_104[li_144] = 100.0 * iHigh(a_symbol_4, a_timeframe_12, li_144) / iHigh(a_symbol_4, a_timeframe_12, li_144 + li_148);
            if (ad_28 == 3.0) lda_104[li_144] = 100.0 * iLow(a_symbol_4, a_timeframe_12, li_144) / iLow(a_symbol_4, a_timeframe_12, li_144 + li_148);
            if (ad_28 == 4.0) {
               lda_104[li_144] = 100.0 * ((iHigh(a_symbol_4, a_timeframe_12, li_144) + iLow(a_symbol_4, a_timeframe_12, li_144)) / 2.0) / ((iHigh(a_symbol_4, a_timeframe_12, li_144 +
                  li_148) + iLow(a_symbol_4, a_timeframe_12, li_144 + li_148)) / 2.0);
            }
            if (ad_28 == 5.0) {
               lda_104[li_144] = 100.0 * ((iHigh(a_symbol_4, a_timeframe_12, li_144) + iLow(a_symbol_4, a_timeframe_12, li_144) + iClose(a_symbol_4, a_timeframe_12, li_144)) / 3.0) / ((iHigh(a_symbol_4, a_timeframe_12, li_144 +
                  li_148) + iLow(a_symbol_4, a_timeframe_12, li_144 + li_148) + iClose(a_symbol_4, a_timeframe_12, li_144 + li_148)) / 3.0);
            }
            if (ad_28 == 6.0) {
               lda_104[li_144] = 100.0 * ((iHigh(a_symbol_4, a_timeframe_12, li_144) + iLow(a_symbol_4, a_timeframe_12, li_144) + iClose(a_symbol_4, a_timeframe_12, li_144) + iClose(a_symbol_4, a_timeframe_12, li_144)) / 4.0) / ((iHigh(a_symbol_4, a_timeframe_12, li_144 +
                  li_148) + iLow(a_symbol_4, a_timeframe_12, li_144 + li_148) + iClose(a_symbol_4, a_timeframe_12, li_144 + li_148) + iClose(a_symbol_4, a_timeframe_12, li_144 + li_148)) / 4.0);
            }
         }
         return (lda_104[ai_16]);
      }
      li_148 = a_period_20;
      for (li_144 = 500 - a_period_20 - 1.0; li_144 >= 0; li_144--) {
         if (ad_28 == 0.0) lda_104[li_144] = 100.0 * Close[li_144] / (Close[li_144 + li_148]);
         if (ad_28 == 1.0) lda_104[li_144] = 100.0 * Open[li_144] / (Open[li_144 + li_148]);
         if (ad_28 == 2.0) lda_104[li_144] = 100.0 * High[li_144] / (High[li_144 + li_148]);
         if (ad_28 == 3.0) lda_104[li_144] = 100.0 * Low[li_144] / (Low[li_144 + li_148]);
         if (ad_28 == 4.0) lda_104[li_144] = 100.0 * ((High[li_144] + Low[li_144]) / 2.0) / ((High[li_144 + li_148] + (Low[li_144 + li_148])) / 2.0);
         if (ad_28 == 5.0) lda_104[li_144] = 100.0 * ((High[li_144] + Low[li_144] + Close[li_144]) / 3.0) / ((High[li_144 + li_148] + (Low[li_144 + li_148]) + (Close[li_144 + li_148])) / 3.0);
         if (ad_28 == 6.0) {
            lda_104[li_144] = 100.0 * ((High[li_144] + Low[li_144] + Close[li_144] + Close[li_144]) / 4.0) / ((High[li_144 + li_148] + (Low[li_144 + li_148]) + (Close[li_144 +
               li_148]) + (Close[li_144 + li_148])) / 4.0);
         }
      }
      return (lda_104[ai_16]);
   case 57:
      ArraySetAsSeries(lda_104, TRUE);
      ArraySetAsSeries(lda_108, TRUE);
      ArraySetAsSeries(lda_112, TRUE);
      if (li_100) {
         RefreshRates();
         for (li_144 = 0; li_144 < li_184; li_144++) lda_104[li_144] = iMA(a_symbol_4, a_timeframe_12, a_period_20, 0, MODE_EMA, ad_44, li_144) - iMA(a_symbol_4, a_timeframe_12, ad_28, 0, MODE_EMA, ad_44, li_144);
         for (li_144 = 0; li_144 < li_184; li_144++) lda_108[li_144] = iMAOnArray(lda_104, li_184, a_period_36, 0, MODE_SMA, li_144);
         for (li_144 = 0; li_144 < li_184; li_144++) lda_112[li_144] = lda_104[li_144] - lda_108[li_144];
         return (lda_112[ai_16]);
      }
      for (li_144 = 0; li_144 < li_184; li_144++) lda_104[li_144] = iMA(NULL, 0, a_period_20, 0, MODE_EMA, ad_44, li_144) - iMA(NULL, 0, ad_28, 0, MODE_EMA, ad_44, li_144);
      for (li_144 = 0; li_144 < li_184; li_144++) lda_108[li_144] = iMAOnArray(lda_104, li_184, a_period_36, 0, MODE_SMA, li_144);
      for (li_144 = 0; li_144 < li_184; li_144++) lda_112[li_144] = lda_104[li_144] - lda_108[li_144];
      return (lda_112[ai_16]);
   case 58:
      ArraySetAsSeries(lda_104, TRUE);
      if (li_100) {
         RefreshRates();
         li_332 = TRUE;
         li_144 = 498;
         if (li_332) {
            li_332 = FALSE;
            li_336 = TRUE;
            ld_264 = a_period_20;
            ld_272 = -10000000.0;
            ld_280 = 10000000.0;
            while (li_144 > 0) {
               li_152 = li_144;
               l_ilow_304 = iLow(a_symbol_4, a_timeframe_12, li_144);
               if (ld_280 > l_ilow_304) ld_280 = l_ilow_304;
               l_ihigh_312 = iHigh(a_symbol_4, a_timeframe_12, li_144);
               if (ld_272 < l_ihigh_312) ld_272 = l_ihigh_312;
               if (l_ihigh_312 > iHigh(a_symbol_4, a_timeframe_12, li_144 + 1) && l_ilow_304 > iLow(a_symbol_4, a_timeframe_12, li_144 + 1)) break;
               if (l_ihigh_312 < iHigh(a_symbol_4, a_timeframe_12, li_144 + 1) && l_ilow_304 < iLow(a_symbol_4, a_timeframe_12, li_144 + 1)) {
                  li_336 = FALSE;
                  break;
               }
               li_144--;
            }
            if (li_336) {
               lda_104[li_144] = iLow(a_symbol_4, a_timeframe_12, li_144 + 1);
               ld_288 = iHigh(a_symbol_4, a_timeframe_12, li_144);
            } else {
               lda_104[li_144] = iHigh(a_symbol_4, a_timeframe_12, li_144 + 1);
               ld_288 = iLow(a_symbol_4, a_timeframe_12, li_144);
            }
            li_144--;
         } else {
            li_144 = li_152;
            ld_264 = ld_224;
            li_336 = li_328;
            ld_272 = ld_232;
            ld_280 = ld_240;
            ld_288 = ld_248;
            ld_296 = ld_256;
         }
         while (li_144 >= 0) {
            l_ilow_304 = iLow(a_symbol_4, a_timeframe_12, li_144);
            l_ihigh_312 = iHigh(a_symbol_4, a_timeframe_12, li_144);
            if (li_336 && l_ilow_304 < lda_104[li_144 + 1]) {
               li_152 = li_144;
               li_328 = TRUE;
               ld_224 = ld_264;
               ld_240 = l_ilow_304;
               ld_232 = ld_272;
               ld_248 = ld_288;
               ld_256 = ld_296;
               ld_264 = a_period_20;
               li_336 = FALSE;
               ld_288 = l_ilow_304;
               ld_280 = l_ilow_304;
               lda_104[li_144] = ld_272;
               li_144--;
               continue;
            }
            if (!li_336 && l_ihigh_312 > lda_104[li_144 + 1]) {
               li_152 = li_144;
               li_328 = FALSE;
               ld_224 = ld_264;
               ld_240 = ld_280;
               ld_232 = l_ihigh_312;
               ld_248 = ld_288;
               ld_256 = ld_296;
               ld_264 = a_period_20;
               li_336 = TRUE;
               ld_288 = l_ihigh_312;
               ld_272 = l_ihigh_312;
               lda_104[li_144] = ld_280;
               li_144--;
               continue;
            }
            ld_320 = lda_104[li_144 + 1];
            ld_296 = ld_320 + ld_264 * (ld_288 - ld_320);
            if (li_336) {
               if (ld_288 < l_ihigh_312 && ld_264 + a_period_20 <= ad_28) ld_264 += a_period_20;
               if (l_ihigh_312 < iHigh(a_symbol_4, a_timeframe_12, li_144 + 1) && li_144 == 498) ld_296 = lda_104[li_144 + 1];
               ld_320 = iLow(a_symbol_4, a_timeframe_12, li_144 + 1);
               if (ld_296 > ld_320) ld_296 = ld_320;
               ld_320 = iLow(a_symbol_4, a_timeframe_12, li_144 + 2);
               if (ld_296 > ld_320) ld_296 = ld_320;
               if (ld_296 > l_ilow_304) {
                  li_152 = li_144;
                  li_328 = TRUE;
                  ld_224 = ld_264;
                  ld_240 = l_ilow_304;
                  ld_232 = ld_272;
                  ld_248 = ld_288;
                  ld_256 = ld_296;
                  ld_264 = a_period_20;
                  li_336 = FALSE;
                  ld_288 = l_ilow_304;
                  ld_280 = l_ilow_304;
                  lda_104[li_144] = ld_272;
                  li_144--;
                  continue;
               }
               if (ld_288 < l_ihigh_312) {
                  ld_272 = l_ihigh_312;
                  ld_288 = l_ihigh_312;
               }
            } else {
               if (ld_288 > l_ilow_304 && ld_264 + a_period_20 <= ad_28) ld_264 += a_period_20;
               if (l_ilow_304 < iLow(a_symbol_4, a_timeframe_12, li_144 + 1) && li_144 == 498) ld_296 = lda_104[li_144 + 1];
               ld_320 = iHigh(a_symbol_4, a_timeframe_12, li_144 + 1);
               if (ld_296 < ld_320) ld_296 = ld_320;
               ld_320 = iHigh(a_symbol_4, a_timeframe_12, li_144 + 2);
               if (ld_296 < ld_320) ld_296 = ld_320;
               if (ld_296 < l_ihigh_312) {
                  li_152 = li_144;
                  li_328 = FALSE;
                  ld_224 = ld_264;
                  ld_240 = ld_280;
                  ld_232 = l_ihigh_312;
                  ld_248 = ld_288;
                  ld_256 = ld_296;
                  ld_264 = a_period_20;
                  li_336 = TRUE;
                  ld_288 = l_ihigh_312;
                  ld_272 = l_ihigh_312;
                  lda_104[li_144] = ld_280;
                  li_144--;
                  continue;
               }
               if (ld_288 > l_ilow_304) {
                  ld_280 = l_ilow_304;
                  ld_288 = l_ilow_304;
               }
            }
            lda_104[li_144] = ld_296;
            li_144--;
         }
         return (lda_104[ai_16]);
      }
      li_332 = TRUE;
      li_144 = 498;
      if (li_332) {
         li_332 = FALSE;
         li_336 = TRUE;
         ld_264 = a_period_20;
         ld_272 = -10000000.0;
         ld_280 = 10000000.0;
         while (li_144 > 0) {
            li_152 = li_144;
            l_ilow_304 = Low[li_144];
            if (ld_280 > l_ilow_304) ld_280 = l_ilow_304;
            l_ihigh_312 = High[li_144];
            if (ld_272 < l_ihigh_312) ld_272 = l_ihigh_312;
            if (l_ihigh_312 > High[li_144 + 1] && l_ilow_304 > Low[li_144 + 1]) break;
            if (l_ihigh_312 < High[li_144 + 1] && l_ilow_304 < Low[li_144 + 1]) {
               li_336 = FALSE;
               break;
            }
            li_144--;
         }
         if (li_336) {
            lda_104[li_144] = Low[li_144 + 1];
            ld_288 = High[li_144];
         } else {
            lda_104[li_144] = High[li_144 + 1];
            ld_288 = Low[li_144];
         }
         li_144--;
      } else {
         li_144 = li_152;
         ld_264 = ld_224;
         li_336 = li_328;
         ld_272 = ld_232;
         ld_280 = ld_240;
         ld_288 = ld_248;
         ld_296 = ld_256;
      }
      while (li_144 >= 0) {
         l_ilow_304 = Low[li_144];
         l_ihigh_312 = High[li_144];
         if (li_336 && l_ilow_304 < lda_104[li_144 + 1]) {
            li_152 = li_144;
            li_328 = TRUE;
            ld_224 = ld_264;
            ld_240 = l_ilow_304;
            ld_232 = ld_272;
            ld_248 = ld_288;
            ld_256 = ld_296;
            ld_264 = a_period_20;
            li_336 = FALSE;
            ld_288 = l_ilow_304;
            ld_280 = l_ilow_304;
            lda_104[li_144] = ld_272;
            li_144--;
            continue;
         }
         if (!li_336 && l_ihigh_312 > lda_104[li_144 + 1]) {
            li_152 = li_144;
            li_328 = FALSE;
            ld_224 = ld_264;
            ld_240 = ld_280;
            ld_232 = l_ihigh_312;
            ld_248 = ld_288;
            ld_256 = ld_296;
            ld_264 = a_period_20;
            li_336 = TRUE;
            ld_288 = l_ihigh_312;
            ld_272 = l_ihigh_312;
            lda_104[li_144] = ld_280;
            li_144--;
            continue;
         }
         ld_320 = lda_104[li_144 + 1];
         ld_296 = ld_320 + ld_264 * (ld_288 - ld_320);
         if (li_336) {
            if (ld_288 < l_ihigh_312 && ld_264 + a_period_20 <= ad_28) ld_264 += a_period_20;
            if (l_ihigh_312 < High[li_144 + 1] && li_144 == 498) ld_296 = lda_104[li_144 + 1];
            ld_320 = Low[li_144 + 1];
            if (ld_296 > ld_320) ld_296 = ld_320;
            ld_320 = Low[li_144 + 2];
            if (ld_296 > ld_320) ld_296 = ld_320;
            if (ld_296 > l_ilow_304) {
               li_152 = li_144;
               li_328 = TRUE;
               ld_224 = ld_264;
               ld_240 = l_ilow_304;
               ld_232 = ld_272;
               ld_248 = ld_288;
               ld_256 = ld_296;
               ld_264 = a_period_20;
               li_336 = FALSE;
               ld_288 = l_ilow_304;
               ld_280 = l_ilow_304;
               lda_104[li_144] = ld_272;
               li_144--;
               continue;
            }
            if (ld_288 < l_ihigh_312) {
               ld_272 = l_ihigh_312;
               ld_288 = l_ihigh_312;
            }
         } else {
            if (ld_288 > l_ilow_304 && ld_264 + a_period_20 <= ad_28) ld_264 += a_period_20;
            if (l_ilow_304 < Low[li_144 + 1] && li_144 == 498) ld_296 = lda_104[li_144 + 1];
            ld_320 = High[li_144 + 1];
            if (ld_296 < ld_320) ld_296 = ld_320;
            ld_320 = High[li_144 + 2];
            if (ld_296 < ld_320) ld_296 = ld_320;
            if (ld_296 < l_ihigh_312) {
               li_152 = li_144;
               li_328 = FALSE;
               ld_224 = ld_264;
               ld_240 = ld_280;
               ld_232 = l_ihigh_312;
               ld_248 = ld_288;
               ld_256 = ld_296;
               ld_264 = a_period_20;
               li_336 = TRUE;
               ld_288 = l_ihigh_312;
               ld_272 = l_ihigh_312;
               lda_104[li_144] = ld_280;
               li_144--;
               continue;
            }
            if (ld_288 > l_ilow_304) {
               ld_280 = l_ilow_304;
               ld_288 = l_ilow_304;
            }
         }
         lda_104[li_144] = ld_296;
         li_144--;
      }
      return (lda_104[ai_16]);
   case 59:
      if (li_100) {
         RefreshRates();
         li_184 = 500 - a_period_20;
         for (li_148 = li_184; li_148 >= 0; li_148--) {
            ld_224 = iLow(a_symbol_4, a_timeframe_12, iLowest(a_symbol_4, a_timeframe_12, MODE_LOW, a_period_20, li_148));
            if (ld_224 == ld_264) ld_224 = 0.0;
            else {
               ld_264 = ld_224;
               if (iLow(a_symbol_4, a_timeframe_12, li_148) - ld_224 > ad_28 * gd_172) ld_224 = 0.0;
               else {
                  for (li_156 = 1; li_156 <= a_period_36; li_156++) {
                     ld_232 = lda_112[li_148 + li_156];
                     if (ld_232 != 0.0 && ld_232 > ld_224) lda_112[li_148 + li_156] = 0.0;
                  }
               }
            }
            if (iLow(a_symbol_4, a_timeframe_12, li_148) == ld_224) lda_112[li_148] = ld_224;
            else lda_112[li_148] = 0.0;
            ld_224 = iHigh(a_symbol_4, a_timeframe_12, iHighest(a_symbol_4, a_timeframe_12, MODE_HIGH, a_period_20, li_148));
            if (ld_224 == ld_256) ld_224 = 0.0;
            else {
               ld_256 = ld_224;
               if (ld_224 - iHigh(a_symbol_4, a_timeframe_12, li_148) > ad_28 * gd_172) ld_224 = 0.0;
               else {
                  for (li_156 = 1; li_156 <= a_period_36; li_156++) {
                     ld_232 = lda_108[li_148 + li_156];
                     if (ld_232 != 0.0 && ld_232 < ld_224) lda_108[li_148 + li_156] = 0.0;
                  }
               }
            }
            if (iHigh(a_symbol_4, a_timeframe_12, li_148) == ld_224) lda_108[li_148] = ld_224;
            else lda_108[li_148] = 0.0;
         }
         if (li_152 == 0) {
            ld_264 = 0;
            ld_256 = 0;
         } else {
            ld_264 = ld_240;
            ld_256 = ld_248;
         }
         for (li_148 = li_184; li_148 >= 0; li_148--) {
            ld_232 = 0.0;
            switch (li_152) {
            case 0:
               if (ld_264 == 0.0 && ld_256 == 0.0) {
                  if (lda_108[li_148] != 0.0) {
                     ld_256 = iHigh(a_symbol_4, a_timeframe_12, li_148);
                     li_156 = li_148;
                     li_152 = -1;
                     lda_104[li_148] = ld_256;
                     ld_232 = 1;
                  }
                  if (lda_112[li_148] != 0.0) {
                     ld_264 = iLow(a_symbol_4, a_timeframe_12, li_148);
                     li_160 = li_148;
                     li_152 = 1;
                     lda_104[li_148] = ld_264;
                     ld_232 = 1;
                  }
               }
               break;
            case 1:
               if (lda_112[li_148] != 0.0 && lda_112[li_148] < ld_264 && lda_108[li_148] == 0.0) {
                  lda_104[li_160] = 0.0;
                  li_160 = li_148;
                  ld_264 = lda_112[li_148];
                  lda_104[li_148] = ld_264;
                  ld_232 = 1;
               }
               if (lda_108[li_148] != 0.0 && lda_112[li_148] == 0.0) {
                  ld_256 = lda_108[li_148];
                  li_156 = li_148;
                  lda_104[li_148] = ld_256;
                  li_152 = -1;
                  ld_232 = 1;
               }
               break;
            case -1:
               if (lda_108[li_148] != 0.0 && lda_108[li_148] > ld_256 && lda_112[li_148] == 0.0) {
                  lda_104[li_156] = 0.0;
                  li_156 = li_148;
                  ld_256 = lda_108[li_148];
                  lda_104[li_148] = ld_256;
               }
               if (lda_112[li_148] != 0.0 && lda_108[li_148] == 0.0) {
                  ld_264 = lda_112[li_148];
                  li_160 = li_148;
                  lda_104[li_148] = ld_264;
                  li_152 = 1;
               }
               break;
            default:
               return/*(WARN)*/;
            }
         }
         return (lda_104[ai_16]);
      }
      li_184 = 500 - a_period_20;
      for (li_148 = li_184; li_148 >= 0; li_148--) {
         ld_224 = Low[iLowest(NULL, 0, MODE_LOW, a_period_20, li_148)];
         if (ld_224 == ld_264) ld_224 = 0.0;
         else {
            ld_264 = ld_224;
            if (Low[li_148] - ld_224 > ad_28 * gd_172) ld_224 = 0.0;
            else {
               for (li_156 = 1; li_156 <= a_period_36; li_156++) {
                  ld_232 = lda_112[li_148 + li_156];
                  if (ld_232 != 0.0 && ld_232 > ld_224) lda_112[li_148 + li_156] = 0.0;
               }
            }
         }
         if (Low[li_148] == ld_224) lda_112[li_148] = ld_224;
         else lda_112[li_148] = 0.0;
         ld_224 = High[iHighest(NULL, 0, MODE_HIGH, a_period_20, li_148)];
         if (ld_224 == ld_256) ld_224 = 0.0;
         else {
            ld_256 = ld_224;
            if (ld_224 - High[li_148] > ad_28 * gd_172) ld_224 = 0.0;
            else {
               for (li_156 = 1; li_156 <= a_period_36; li_156++) {
                  ld_232 = lda_108[li_148 + li_156];
                  if (ld_232 != 0.0 && ld_232 < ld_224) lda_108[li_148 + li_156] = 0.0;
               }
            }
         }
         if (High[li_148] == ld_224) lda_108[li_148] = ld_224;
         else lda_108[li_148] = 0.0;
      }
      if (li_152 == 0) {
         ld_264 = 0;
         ld_256 = 0;
      } else {
         ld_264 = ld_240;
         ld_256 = ld_248;
      }
      for (li_148 = li_184; li_148 >= 0; li_148--) {
         ld_232 = 0.0;
         switch (li_152) {
         case 0:
            if (ld_264 == 0.0 && ld_256 == 0.0) {
               if (lda_108[li_148] != 0.0) {
                  ld_256 = High[li_148];
                  li_156 = li_148;
                  li_152 = -1;
                  lda_104[li_148] = ld_256;
                  ld_232 = 1;
               }
               if (lda_112[li_148] != 0.0) {
                  ld_264 = Low[li_148];
                  li_160 = li_148;
                  li_152 = 1;
                  lda_104[li_148] = ld_264;
                  ld_232 = 1;
               }
            }
            break;
         case 1:
            if (lda_112[li_148] != 0.0 && lda_112[li_148] < ld_264 && lda_108[li_148] == 0.0) {
               lda_104[li_160] = 0.0;
               li_160 = li_148;
               ld_264 = lda_112[li_148];
               lda_104[li_148] = ld_264;
               ld_232 = 1;
            }
            if (lda_108[li_148] != 0.0 && lda_112[li_148] == 0.0) {
               ld_256 = lda_108[li_148];
               li_156 = li_148;
               lda_104[li_148] = ld_256;
               li_152 = -1;
               ld_232 = 1;
            }
            break;
         case -1:
            if (lda_108[li_148] != 0.0 && lda_108[li_148] > ld_256 && lda_112[li_148] == 0.0) {
               lda_104[li_156] = 0.0;
               li_156 = li_148;
               ld_256 = lda_108[li_148];
               lda_104[li_148] = ld_256;
            }
            if (lda_112[li_148] != 0.0 && lda_108[li_148] == 0.0) {
               ld_264 = lda_112[li_148];
               li_160 = li_148;
               lda_104[li_148] = ld_264;
               li_152 = 1;
            }
            break;
         default:
            return/*(WARN)*/;
         }
      }
      return (lda_104[ai_16]);
   case 60:
      ArraySetAsSeries(lda_104, TRUE);
      ArraySetAsSeries(lda_108, TRUE);
      ArraySetAsSeries(lda_112, TRUE);
      if (li_100) {
         RefreshRates();
         for (li_144 = 500 - a_period_20 - 1.0; li_144 >= 0; li_144--) {
            ld_248 = 0.0;
            ld_256 = 0.0;
            if (li_144 == 500 - a_period_20 - 1.0) {
               for (li_148 = 498; li_148 >= li_144; li_148--) {
                  if (ad_28 == 0.0) ld_224 = iClose(a_symbol_4, a_timeframe_12, li_148) - iClose(a_symbol_4, a_timeframe_12, li_148 + 1);
                  if (ad_28 == 1.0) ld_224 = iOpen(a_symbol_4, a_timeframe_12, li_148) - iOpen(a_symbol_4, a_timeframe_12, li_148 + 1);
                  if (ad_28 == 2.0) ld_224 = iHigh(a_symbol_4, a_timeframe_12, li_148) - iHigh(a_symbol_4, a_timeframe_12, li_148 + 1);
                  if (ad_28 == 3.0) ld_224 = iLow(a_symbol_4, a_timeframe_12, li_148) - iLow(a_symbol_4, a_timeframe_12, li_148 + 1);
                  if (ad_28 == 4.0) {
                     ld_224 = (iHigh(a_symbol_4, a_timeframe_12, li_148) + iLow(a_symbol_4, a_timeframe_12, li_148)) / 2.0 - (iHigh(a_symbol_4, a_timeframe_12, li_148 + 1) + iLow(a_symbol_4, a_timeframe_12, li_148 +
                        1)) / 2.0;
                  }
                  if (ad_28 == 5.0) {
                     ld_224 = (iHigh(a_symbol_4, a_timeframe_12, li_148) + iLow(a_symbol_4, a_timeframe_12, li_148) + iClose(a_symbol_4, a_timeframe_12, li_148)) / 3.0 - (iHigh(a_symbol_4, a_timeframe_12, li_148 +
                        1) + iLow(a_symbol_4, a_timeframe_12, li_148 + 1) + iClose(a_symbol_4, a_timeframe_12, li_148 + 1)) / 3.0;
                  }
                  if (ad_28 == 6.0) {
                     ld_224 = (iHigh(a_symbol_4, a_timeframe_12, li_148) + iLow(a_symbol_4, a_timeframe_12, li_148) + iClose(a_symbol_4, a_timeframe_12, li_148) + iClose(a_symbol_4, a_timeframe_12, li_148)) / 4.0 - (iHigh(a_symbol_4, a_timeframe_12, li_148 +
                        1) + iLow(a_symbol_4, a_timeframe_12, li_148 + 1) + iClose(a_symbol_4, a_timeframe_12, li_148 + 1) + iClose(a_symbol_4, a_timeframe_12, li_148 + 1)) / 4.0;
                  }
                  if (ld_224 > 0.0) ld_256 += ld_224;
                  else ld_248 -= ld_224;
               }
               ld_240 = ld_256 / a_period_20;
               ld_232 = ld_248 / a_period_20;
            } else {
               if (ad_28 == 0.0) ld_224 = iClose(a_symbol_4, a_timeframe_12, li_144) - iClose(a_symbol_4, a_timeframe_12, li_144 + 1);
               if (ad_28 == 1.0) ld_224 = iOpen(a_symbol_4, a_timeframe_12, li_144) - iOpen(a_symbol_4, a_timeframe_12, li_144 + 1);
               if (ad_28 == 2.0) ld_224 = iHigh(a_symbol_4, a_timeframe_12, li_144) - iHigh(a_symbol_4, a_timeframe_12, li_144 + 1);
               if (ad_28 == 3.0) ld_224 = iLow(a_symbol_4, a_timeframe_12, li_144) - iLow(a_symbol_4, a_timeframe_12, li_144 + 1);
               if (ad_28 == 4.0) {
                  ld_224 = (iHigh(a_symbol_4, a_timeframe_12, li_144) + iLow(a_symbol_4, a_timeframe_12, li_144)) / 2.0 - (iHigh(a_symbol_4, a_timeframe_12, li_144 + 1) + iLow(a_symbol_4, a_timeframe_12, li_144 +
                     1)) / 2.0;
               }
               if (ad_28 == 5.0) {
                  ld_224 = (iHigh(a_symbol_4, a_timeframe_12, li_144) + iLow(a_symbol_4, a_timeframe_12, li_144) + iClose(a_symbol_4, a_timeframe_12, li_144)) / 3.0 - (iHigh(a_symbol_4, a_timeframe_12, li_144 +
                     1) + iLow(a_symbol_4, a_timeframe_12, li_144 + 1) + iClose(a_symbol_4, a_timeframe_12, li_144 + 1)) / 3.0;
               }
               if (ad_28 == 6.0) {
                  ld_224 = (iHigh(a_symbol_4, a_timeframe_12, li_144) + iLow(a_symbol_4, a_timeframe_12, li_144) + iClose(a_symbol_4, a_timeframe_12, li_144) + iClose(a_symbol_4, a_timeframe_12, li_144)) / 4.0 - (iHigh(a_symbol_4, a_timeframe_12, li_144 +
                     1) + iLow(a_symbol_4, a_timeframe_12, li_144 + 1) + iClose(a_symbol_4, a_timeframe_12, li_144 + 1) + iClose(a_symbol_4, a_timeframe_12, li_144 + 1)) / 4.0;
               }
               if (ld_224 > 0.0) ld_256 = ld_224;
               else ld_248 = -ld_224;
               ld_240 = ((lda_108[li_144 + 1]) * (a_period_20 - 1.0) + ld_256) / a_period_20;
               ld_232 = ((lda_112[li_144 + 1]) * (a_period_20 - 1.0) + ld_248) / a_period_20;
            }
            lda_108[li_144] = ld_240;
            lda_112[li_144] = ld_232;
            if (ld_232 == 0.0) lda_104[li_144] = 0.0;
            else lda_104[li_144] = 100.0 - 100.0 / (ld_240 / ld_232 + 1.0);
         }
         return (lda_104[ai_16]);
      }
      for (li_144 = 500 - a_period_20 - 1.0; li_144 >= 0; li_144--) {
         ld_248 = 0.0;
         ld_256 = 0.0;
         if (li_144 == 500 - a_period_20 - 1.0) {
            for (li_148 = 498; li_148 >= li_144; li_148--) {
               if (ad_28 == 0.0) ld_224 = Close[li_148] - (Close[li_148 + 1]);
               if (ad_28 == 1.0) ld_224 = Open[li_148] - (Open[li_148 + 1]);
               if (ad_28 == 2.0) ld_224 = High[li_148] - (High[li_148 + 1]);
               if (ad_28 == 3.0) ld_224 = Low[li_148] - (Low[li_148 + 1]);
               if (ad_28 == 4.0) ld_224 = (High[li_148] + Low[li_148]) / 2.0 - (High[li_148 + 1] + (Low[li_148 + 1])) / 2.0;
               if (ad_28 == 5.0) ld_224 = (High[li_148] + Low[li_148] + Close[li_148]) / 3.0 - (High[li_148 + 1] + (Low[li_148 + 1]) + (Close[li_148 + 1])) / 3.0;
               if (ad_28 == 6.0) ld_224 = (High[li_148] + Low[li_148] + Close[li_148] + Close[li_148]) / 4.0 - (High[li_148 + 1] + (Low[li_148 + 1]) + (Close[li_148 + 1]) + (Close[li_148 + 1])) / 4.0;
               if (ld_224 > 0.0) ld_256 += ld_224;
               else ld_248 -= ld_224;
            }
            ld_240 = ld_256 / a_period_20;
            ld_232 = ld_248 / a_period_20;
         } else {
            if (ad_28 == 0.0) ld_224 = Close[li_144] - (Close[li_144 + 1]);
            if (ad_28 == 1.0) ld_224 = Open[li_144] - (Open[li_144 + 1]);
            if (ad_28 == 2.0) ld_224 = High[li_144] - (High[li_144 + 1]);
            if (ad_28 == 3.0) ld_224 = Low[li_144] - (Low[li_144 + 1]);
            if (ad_28 == 4.0) ld_224 = (High[li_144] + Low[li_144]) / 2.0 - (High[li_144 + 1] + (Low[li_144 + 1])) / 2.0;
            if (ad_28 == 5.0) ld_224 = (High[li_144] + Low[li_144] + Close[li_144]) / 3.0 - (High[li_144 + 1] + (Low[li_144 + 1]) + (Close[li_144 + 1])) / 3.0;
            if (ad_28 == 6.0) ld_224 = (High[li_144] + Low[li_144] + Close[li_144] + Close[li_144]) / 4.0 - (High[li_144 + 1] + (Low[li_144 + 1]) + (Close[li_144 + 1]) + (Close[li_144 + 1])) / 4.0;
            if (ld_224 > 0.0) ld_256 = ld_224;
            else ld_248 = -ld_224;
            ld_240 = ((lda_108[li_144 + 1]) * (a_period_20 - 1.0) + ld_256) / a_period_20;
            ld_232 = ((lda_112[li_144 + 1]) * (a_period_20 - 1.0) + ld_248) / a_period_20;
         }
         lda_108[li_144] = ld_240;
         lda_112[li_144] = ld_232;
         if (ld_232 == 0.0) lda_104[li_144] = 0.0;
         else lda_104[li_144] = 100.0 - 100.0 / (ld_240 / ld_232 + 1.0);
      }
      return (lda_104[ai_16]);
   case 61:
      ArraySetAsSeries(lda_104, TRUE);
      ArraySetAsSeries(lda_108, TRUE);
      ArraySetAsSeries(lda_112, TRUE);
      ArraySetAsSeries(lda_116, TRUE);
      if (li_100) {
         RefreshRates();
         li_148 = 0;
         li_152 = 0;
         for (li_144 = 500 - a_period_20; li_144 >= 0; li_144--) {
            ld_232 = 1000000;
            for (li_156 = li_144 + a_period_20 - 1.0; li_156 >= li_144; li_156--) {
               if (a_period_52 == 0.0) ld_224 = iLow(a_symbol_4, a_timeframe_12, li_156);
               if (a_period_52 == 1.0) ld_224 = iClose(a_symbol_4, a_timeframe_12, li_156);
               if (ld_232 > ld_224) ld_232 = ld_224;
            }
            lda_116[li_144] = ld_232;
         }
         for (li_144 = 500 - a_period_20; li_144 >= 0; li_144--) {
            ld_240 = -1000000;
            for (li_156 = li_144 + a_period_20 - 1.0; li_156 >= li_144; li_156--) {
               if (a_period_52 == 0.0) ld_224 = iHigh(a_symbol_4, a_timeframe_12, li_156);
               if (a_period_52 == 1.0) ld_224 = iClose(a_symbol_4, a_timeframe_12, li_156);
               if (ld_240 < ld_224) ld_240 = ld_224;
            }
            lda_112[li_144] = ld_240;
         }
         for (li_144 = 500 - li_148; li_144 >= 0; li_144--) {
            ld_248 = 0.0;
            ld_256 = 0.0;
            for (li_156 = li_144 + a_period_36 - 1.0; li_156 >= li_144; li_156--) {
               ld_248 += iClose(a_symbol_4, a_timeframe_12, li_156) - lda_116[li_156];
               ld_256 += lda_112[li_156] - lda_116[li_156];
            }
            if (ld_256 == 0.0) lda_104[li_144] = 100.0;
            else lda_104[li_144] = 100.0 * (ld_248 / ld_256);
         }
         for (li_144 = 0; li_144 < li_184; li_144++) lda_108[li_144] = iMAOnArray(lda_104, li_184, ad_28, 0, ad_44, li_144);
         if (ad_60 == 0.0) return (lda_104[ai_16]);
         if (ad_60 != 1.0) break;
         return (lda_108[ai_16]);
      }
      li_148 = 0;
      li_152 = 0;
      for (li_144 = 500 - a_period_20; li_144 >= 0; li_144--) {
         ld_232 = 1000000;
         for (li_156 = li_144 + a_period_20 - 1.0; li_156 >= li_144; li_156--) {
            if (a_period_52 == 0.0) ld_224 = Low[li_156];
            if (a_period_52 == 1.0) ld_224 = Close[li_156];
            if (ld_232 > ld_224) ld_232 = ld_224;
         }
         lda_116[li_144] = ld_232;
      }
      for (li_144 = 500 - a_period_20; li_144 >= 0; li_144--) {
         ld_240 = -1000000;
         for (li_156 = li_144 + a_period_20 - 1.0; li_156 >= li_144; li_156--) {
            if (a_period_52 == 0.0) ld_224 = High[li_156];
            if (a_period_52 == 1.0) ld_224 = Close[li_156];
            if (ld_240 < ld_224) ld_240 = ld_224;
         }
         lda_112[li_144] = ld_240;
      }
      for (li_144 = 500 - li_148; li_144 >= 0; li_144--) {
         ld_248 = 0.0;
         ld_256 = 0.0;
         for (li_156 = li_144 + a_period_36 - 1.0; li_156 >= li_144; li_156--) {
            ld_248 += Close[li_156] - lda_116[li_156];
            ld_256 += lda_112[li_156] - lda_116[li_156];
         }
         if (ld_256 == 0.0) lda_104[li_144] = 100.0;
         else lda_104[li_144] = 100.0 * (ld_248 / ld_256);
      }
      for (li_144 = 0; li_144 < li_184; li_144++) lda_108[li_144] = iMAOnArray(lda_104, li_184, ad_28, 0, ad_44, li_144);
      if (ad_60 == 0.0) return (lda_104[ai_16]);
      if (ad_60 == 1.0) return (lda_108[ai_16]);
      break;
   case 62:
      li_144 = 0;
      li_148 = MathSqrt(a_period_20);
      li_152 = a_period_20 + 100.0 + 1.0;
      if (li_152 > Bars) li_152 = Bars;
      ArrayResize(lda_104, li_152);
      ArraySetAsSeries(lda_104, TRUE);
      ArrayResize(lda_108, li_152);
      ArraySetAsSeries(lda_108, TRUE);
      ArrayResize(lda_112, li_152);
      ArraySetAsSeries(lda_112, TRUE);
      ArrayResize(lda_116, li_152);
      ArraySetAsSeries(lda_116, TRUE);
      ArrayResize(lda_120, li_152);
      ArraySetAsSeries(lda_120, TRUE);
      for (li_144 = 0; li_144 < li_152; li_144++) lda_104[li_144] = 2.0 * _UaUYhrtAVzirxMRmlxrHKKLUCiTcx(li_144, a_period_20 / 2.0, ad_28, a_period_36) - _UaUYhrtAVzirxMRmlxrHKKLUCiTcx(li_144, a_period_20, ad_28, a_period_36);
      for (li_144 = 0; li_144 < li_152 - a_period_20; li_144++) lda_120[li_144] = iMAOnArray(lda_104, 0, li_148, 0, ad_28, li_144);
      for (li_144 = li_152 - a_period_20; li_144 >= 0; li_144--) {
         lda_108[li_144] = lda_108[li_144 + 1];
         if (lda_120[li_144] > lda_120[li_144 + 1]) lda_108[li_144] = 1;
         if (lda_120[li_144] < lda_120[li_144 + 1]) lda_108[li_144] = -1;
         if (lda_108[li_144] > 0.0) {
            lda_112[li_144] = lda_120[li_144];
            if (lda_108[li_144 + 1] < 0.0) lda_112[li_144 + 1] = lda_120[li_144 + 1];
            lda_116[li_144] = EMPTY_VALUE;
         } else {
            if (lda_108[li_144] < 0.0) {
               lda_116[li_144] = lda_120[li_144];
               if (lda_108[li_144 + 1] > 0.0) lda_116[li_144 + 1] = lda_120[li_144 + 1];
               lda_112[li_144] = EMPTY_VALUE;
            }
         }
      }
      if (ad_44 == 0.0) return (lda_112[ai_16]);
      if (ad_44 == 1.0) return (lda_116[ai_16]);
      break;
   }
   return (0.0);
}

int _kUsYjjFPKTbCzAanHOZUzTJYNlURO(bool ai_0 = FALSE, int ai_4 = 3) {
   if (ai_0) g_count_276 = 0;
   g_count_276++;
   if (ai_4 == g_count_276) return (1);
   return (0);
}

void _KGzTXaNAcvdBsMkYgLbpWEqfMutvP(string &asa_0[14]) {
   asa_0[0] = AccountCompany();
   asa_0[1] = AccountCurrency();
   asa_0[2] = AccountName();
   asa_0[3] = WindowExpertName();
   asa_0[4] = AccountServer();
   asa_0[5] = AccountNumber();
   asa_0[6] = TerminalCompany();
   asa_0[7] = TerminalName();
   asa_0[8] = TerminalPath();
   asa_0[9] = TimeToStr(TimeCurrent(), TIME_DATE);
   asa_0[10] = "2";
   asa_0[11] = Symbol();
   asa_0[12] = "12345";
   asa_0[13] = DoubleToStr(IsTesting(), 0);
}

void _kuwQuJnmSsixpiqexkdPQijtyfejN(int ai_0, int ai_4, string a_text_8, color a_color_16 = 65535, int ai_20 = 5, int a_y_24 = 20, int ai_28 = 40, int ai_32 = 15) {
   bool li_36 = FALSE;
   string ls_40 = "CPrint_Line" + ai_0 + "_" + ai_4;
   for (int l_objs_total_48 = ObjectsTotal(); l_objs_total_48 >= 0; l_objs_total_48--)
      if (StringFind(ObjectName(l_objs_total_48), ls_40, 0) > -1) li_36 = TRUE;
   if (li_36) {
      ObjectSetText(ls_40, a_text_8, 10, "Times New Roman", a_color_16);
      ObjectsRedraw();
      return;
   }
   ObjectCreate(ls_40, OBJ_LABEL, 0, 0, 0);
   ObjectSetText(ls_40, a_text_8, 10, "Times New Roman", a_color_16);
   ObjectSet(ls_40, OBJPROP_XDISTANCE, ai_20 + (ai_4 - 1) * ai_28);
   if (ai_0 == 1) {
      ObjectSet(ls_40, OBJPROP_YDISTANCE, a_y_24);
      return;
   }
   ObjectSet(ls_40, OBJPROP_YDISTANCE, a_y_24 + ai_32 * (ai_0 - 1));
}