/*
   G e n e r a t e d  by ex4-to-mq4 decompiler FREEWARE 4.0.509.5
   Website:  H tTp : // w W w . Me t a quot E s.nE t
   E-mail :  s u ppoR t@ m etA Q U Ote S . n e t
*/
#property copyright "Copyright © 2013 TrendImperator"
#property link      "http://www.TrendImperator.com"
#property library

// ACCB3202822ED6E88BC3F28C5C725C5E
void f0_3(string As_0) {
   for (int Li_8 = 0; Li_8 < ObjectsTotal(); Li_8++) {
      if (StringFind(ObjectName(Li_8), As_0) == 0) {
         ObjectDelete(ObjectName(Li_8));
         Li_8--;
      }
   }
}

// 195551A93D9935DB29E4997459D1CE07
string f0_1(string As_0) {
   int Li_8;
   int Li_20;
   int str_len_16 = StringLen(As_0);
   for (int Li_12 = 0; Li_12 < str_len_16; Li_12++) {
      Li_20 = 0;
      Li_8 = StringGetChar(As_0, Li_12);
      if (Li_8 > '@' && Li_8 < '[') Li_20 = Li_8 + 32;
      if (Li_8 > '¿' && Li_8 < 'à') Li_20 = Li_8 + 32;
      if (Li_8 == '¨') Li_20 = 184;
      if (Li_20 > 0) As_0 = StringSetChar(As_0, Li_12, Li_20);
   }
   return (As_0);
}

// F6C10D3BF0D2AF5EC2D380CCE3F59185
int f0_6(int Ai_0) {
   if (Ai_0 < 0) return (Time[0] - 60 * (Ai_0 * Period()));
   return (Time[Ai_0]);
}

// F6D28EB969CCA7CE6F2B5B50392F83B4
void f0_7(string As_0, string A_name_8, string As_16, int Ai_24, double A_price_28, color A_color_36 = 16777215, int Ai_unused_40 = 2, int Ai_44 = 6, bool Ai_48 = FALSE) {
   int Li_52 = 0;
   if (!Ai_48) A_name_8 = As_0 + A_name_8 + "_" + TimeToStr(Time[Ai_24]);
   else A_name_8 = As_0 + A_name_8;
   if (ObjectFind(A_name_8) == -1) ObjectCreate(A_name_8, OBJ_ARROW, 0, f0_6(Ai_24 + Li_52), A_price_28);
   ObjectSet(A_name_8, OBJPROP_TIME1, f0_6(Ai_24 + Li_52));
   ObjectSet(A_name_8, OBJPROP_PRICE1, A_price_28);
   ObjectSet(A_name_8, OBJPROP_ARROWCODE, Ai_44);
   ObjectSet(A_name_8, OBJPROP_COLOR, A_color_36);
   if (ObjectFind(A_name_8 + "_1") == -1) ObjectCreate(A_name_8 + "_1", OBJ_FIBO, 0, f0_6(Ai_24 + Li_52 + 1), A_price_28, f0_6(Ai_24 + Li_52 + 1), A_price_28);
   ObjectSet(A_name_8 + "_1", OBJPROP_TIME1, f0_6(Ai_24 + Li_52 + 11));
   ObjectSet(A_name_8 + "_1", OBJPROP_PRICE1, A_price_28);
   ObjectSet(A_name_8 + "_1", OBJPROP_TIME2, f0_6(Ai_24 + Li_52 + 10));
   ObjectSet(A_name_8 + "_1", OBJPROP_PRICE2, A_price_28);
   ObjectSet(A_name_8 + "_1", OBJPROP_FIBOLEVELS, 1);
   ObjectSetFiboDescription(A_name_8 + "_1", 0, As_16);
   ObjectSet(A_name_8 + "_1", OBJPROP_COLOR, A_color_36);
   ObjectSet(A_name_8 + "_1", OBJPROP_LEVELSTYLE, STYLE_DOT);
   ObjectSet(A_name_8 + "_1", OBJPROP_LEVELCOLOR, A_color_36);
   ObjectSet(A_name_8 + "_1", OBJPROP_RAY, FALSE);
   ObjectSet(A_name_8 + "_1", OBJPROP_BACK, FALSE);
}

// E45DEE73B916D844E5CDD02F5BE36601
void f0_5(string As_0, string As_8, string As_16, int Ai_24, double Ad_28, color A_color_36 = 16777215, int Ai_unused_40 = 2, int Ai_unused_44 = 6) {
   string name_48 = As_0 + As_8;
   if (ObjectFind(name_48) == -1) ObjectCreate(name_48, OBJ_FIBO, 0, 0, 0, 0, 0);
   ObjectSet(name_48, OBJPROP_TIME1, f0_6(Ai_24 + 0));
   ObjectSet(name_48, OBJPROP_PRICE1, Ad_28);
   ObjectSet(name_48, OBJPROP_TIME2, f0_6(Ai_24 + 1));
   ObjectSet(name_48, OBJPROP_PRICE2, Ad_28);
   ObjectSet(name_48, OBJPROP_FIBOLEVELS, 1);
   ObjectSetFiboDescription(name_48, 0, As_16);
   ObjectSet(name_48, OBJPROP_COLOR, A_color_36);
   ObjectSet(name_48, OBJPROP_LEVELSTYLE, STYLE_DOT);
   ObjectSet(name_48, OBJPROP_LEVELCOLOR, A_color_36);
   ObjectSet(name_48, OBJPROP_RAY, FALSE);
   ObjectSet(name_48, OBJPROP_BACK, FALSE);
}

// 08A450F344A3667EBA238D1895913EFA
string f0_0(string As_0, string As_8, int Ai_16, double Ad_20, double Ad_28, double Ad_36, int A_datetime_44, int Ai_48, int A_fontsize_52, color A_color_56, int Ai_60, int Ai_64, string As_68, string As_76) {
   string Ls_ret_84 = "";
   int angle_92 = 0;
   if (Ad_20 < 0.0) angle_92 = 180;
   Ad_20 = MathAbs(Ad_20);
   if (Ad_20 > 0.0 && ObjectFind(As_0 + As_8 + A_datetime_44) == -1 && ObjectFind(As_0 + As_8 + ((Time[Ai_16 + 1]))) == -1) {
      ObjectCreate(As_0 + As_8 + A_datetime_44, OBJ_TEXT, 0, A_datetime_44, Ad_20);
      ObjectSetText(As_0 + As_8 + A_datetime_44, CharToStr(Ai_48), A_fontsize_52, "Wingdings", A_color_56);
      ObjectSet(As_0 + As_8 + A_datetime_44, OBJPROP_ANGLE, angle_92);
      if (Ad_28 != Ad_20 && Ad_28 > 0.0) f0_7(As_0, As_8 + "SL", As_68, Ai_16, Ad_28, Ai_60, 2, SYMBOL_RIGHTPRICE);
      if (Ad_36 != Ad_20 && Ad_36 > 0.0) f0_7(As_0, As_8 + "TP", As_76, Ai_16, Ad_36, Ai_64, 2, SYMBOL_RIGHTPRICE);
      Ls_ret_84 = Time[Ai_16] + "," + Ad_20 + "," + Ad_28 + "," + Ad_36;
   }
   return (Ls_ret_84);
}

// D4EED5C505865CAC8540D734FC7729A6
void f0_4(string As_0, string As_8, string A_text_16, double A_angle_24, int Ai_32, int Ai_36, color A_color_40, string A_fontname_44 = "Arial", int A_fontsize_52 = 12, int A_corner_56 = 1, int A_window_60 = 0) {
   int Li_64 = 5;
   int Li_68 = 5;
   string name_72 = As_0 + As_8;
   if (ObjectFind(name_72) == -1) ObjectCreate(name_72, OBJ_LABEL, A_window_60, 0, 0);
   ObjectSet(name_72, OBJPROP_CORNER, A_corner_56);
   ObjectSet(name_72, OBJPROP_XDISTANCE, Li_64 + Ai_32);
   ObjectSet(name_72, OBJPROP_YDISTANCE, Li_68 + Ai_36);
   ObjectSet(name_72, OBJPROP_ANGLE, A_angle_24);
   ObjectSetText(name_72, A_text_16, A_fontsize_52, A_fontname_44, A_color_40);
}

// 209B61012D09A34EF9D3F1E680ABF81A
void f0_2(string As_0, string As_8, int Ai_16, int Ai_20, int Ai_24, int Ai_28, int Ai_32, int Ai_36, int Ai_40, int Ai_44, double Ad_48, int Ai_56) {
   for (int count_60 = 0; count_60 < Ai_24; count_60++) {
      for (int count_64 = 0; count_64 < Ai_28; count_64++) {
         f0_4(As_0, As_8 + "0" + count_60 + "_" + count_64, CharToStr(110), Ad_48, Ai_32 + 22 * count_64, Ai_36 + 16 + 11.4 * count_60, Ai_20, "Wingdings", Ai_44, Ai_40, Ai_56);
         f0_4(As_0, As_8 + "1" + count_60 + "_" + count_64, CharToStr(110), Ad_48, Ai_32 + 22 * count_64, Ai_36 + 20 + 11 * count_60, Ai_16, "Wingdings", Ai_44, Ai_40, Ai_56);
      }
   }
}
