Navigation:Home > Content >

WolfWavesFind_cracked.mq4

Time: 2013-07-24 | Download file:WolfWavesFind_cracked.mq4

#property copyright "Copyright © 2012 http://strategy4you.ru"
#property link      ""

#property indicator_chart_window

#include 
#import "user32.dll"
   int GetParent(int a0);
   int OpenIcon(int a0);
   int BringWindowToTop(int a0);
   int FlashWindow(int a0, int a1);
#import

extern string Key = "123456789";
extern int nPeriod = 60;
extern int FindFor = 15;
extern int Limit = 300;
extern int LabelPoint = 15;
extern bool LabelShow = TRUE;
extern bool OpenWindows_5Point = TRUE;
extern bool Alert_5Point = TRUE;
extern bool OnlyDiver = FALSE;
extern color WolfBullColor = Blue;
extern color WolfBeerColor = Red;
extern color SweetZoneColor = Yellow;
extern int MACDFastEMA = 12;
extern int MACDSlowEMA = 26;
extern int MACDSignalSMA = 9;
int gi_140;
int gi_144 = 0;
int gi_148 = 0;
int gi_152;
int gi_156;
int gi_160;
int gi_164;
double gd_168;
double gd_176;
double gd_184;
double gd_192;
bool gi_200;
bool gi_204;
bool gi_208;
bool gi_212;
double gd_216;
double gd_224;
double gd_232;
double gd_240;
bool gi_248;
int gi_252;
int gi_256;
int gi_260;
double gd_264;
double gd_272;
double gd_280;
double gd_288;
bool gi_296;
int gi_300;
int gi_304;
int gi_308;
double gd_312;
double gd_320;
double gd_328;
double gd_336;
double gda_344[6];
int gia_348[6];
double gda_352[6];
int gia_356[6];
bool gi_360 = TRUE;
int gi_364;
int gi_368 = 0;
bool gi_372 = TRUE;
int gi_376 = 0;
int gi_380;
double gd_384;
int gi_392;
double gd_396;
int gi_404;
double gd_408;
int gi_416;
double gd_420;
int gi_428;
bool gi_432 = TRUE;
int gi_436 = 8;
int gi_440;
bool gi_444 = TRUE;
int gt_448 = 0;

int init() {
   string ls_0;
   int li_8;
   if (Key == "Введите ключ" || Key == "") {
      gi_444 = FALSE;
      Print("Введите лицензионный ключ");
      ls_0 = "label";
      if (ObjectFind(ls_0) == -1) ObjectCreate(ls_0, OBJ_LABEL, 0, 0, 0);
      ObjectSet(ls_0, OBJPROP_CORNER, 1);
      ObjectSet(ls_0, OBJPROP_XDISTANCE, 5);
      ObjectSet(ls_0, OBJPROP_YDISTANCE, 15);
      ObjectSetText(ls_0, "Введите лицензионный ключ!", 10, "Tahoma", Red);
   } else {
      //li_8 = StrToInteger(StringSubstr(Key, 0, StringLen(Key) - 2)) / gi_436 + 369;
      //gi_440 = StrToInteger(StringSubstr(Key, StringLen(Key) - 2, 2)) / StrToInteger(StringSubstr(Key, 0, 1));
      if (AccountNumber()) {
         gi_444 = TRUE;
         Print("Ключ принят!");
         ls_0 = "label";
         if (ObjectFind(ls_0) == -1) ObjectCreate(ls_0, OBJ_LABEL, 0, 0, 0);
         ObjectSet(ls_0, OBJPROP_CORNER, 1);
         ObjectSet(ls_0, OBJPROP_XDISTANCE, 5);
         ObjectSet(ls_0, OBJPROP_YDISTANCE, 15);
         ObjectSetText(ls_0, "Ключ принят!", 10, "Tahoma", Lime);
      } else {
         Print("Неверный лицензионный ключ!");
         ls_0 = "label";
         if (ObjectFind(ls_0) == -1) ObjectCreate(ls_0, OBJ_LABEL, 0, 0, 0);
         ObjectSet(ls_0, OBJPROP_CORNER, 1);
         ObjectSet(ls_0, OBJPROP_XDISTANCE, 5);
         ObjectSet(ls_0, OBJPROP_YDISTANCE, 15);
         ObjectSetText(ls_0, "Неверный лицензионный ключ!", 10, "Tahoma", Red);
      }
   }
   for (gi_364 = 3; gi_364 <= 5; gi_364++) {
      ObjectCreate("Trend DN-" + gi_364, OBJ_TREND, 0, 0, 0, 0, 0);
      ObjectSet("Trend DN-" + gi_364, OBJPROP_COLOR, WolfBullColor);
      ObjectCreate("Trend UP-" + gi_364, OBJ_TREND, 0, 0, 0, 0, 0);
      ObjectSet("Trend Up-" + gi_364, OBJPROP_COLOR, WolfBeerColor);
   }
   for (gi_364 = 1; gi_364 <= 2; gi_364++) {
      ObjectCreate("LabelWolfBeerS-" + gi_364, OBJ_TEXT, 0, 0, 0);
      ObjectSetText("LabelWolfBeerS-" + gi_364, "se" + gi_364, 12, "Times New Roman", WolfBeerColor);
      ObjectCreate("LabelWolfBullS-" + gi_364, OBJ_TEXT, 0, 0, 0);
      ObjectSetText("LabelWolfBullS-" + gi_364, "su" + gi_364, 12, "Times New Roman", WolfBullColor);
      ObjectCreate("ManyWolf-" + gi_364, OBJ_ARROW, 0, 0, 0);
      ObjectSet("ManyWolf-" + gi_364, OBJPROP_ARROWCODE, SYMBOL_LEFTPRICE);
      ObjectCreate("SweetTriangle-" + gi_364, OBJ_TRIANGLE, 0, 0, 0);
      ObjectSet("SweetTriangle-" + gi_364, OBJPROP_COLOR, SweetZoneColor);
   }
   ObjectCreate("SweetZone-12", OBJ_CHANNEL, 0, 0, 0, 0, 0, 0, 0);
   ObjectSet("SweetZone-12", OBJPROP_COLOR, WolfBeerColor);
   ObjectSet("SweetZone-12", OBJPROP_BACK, FALSE);
   ObjectSet("SweetZone-12", OBJPROP_RAY, FALSE);
   ObjectSet("SweetZone-12", OBJPROP_WIDTH, 2);
   ObjectCreate("SweetZone-22", OBJ_CHANNEL, 0, 0, 0, 0, 0, 0, 0);
   ObjectSet("SweetZone-22", OBJPROP_COLOR, WolfBullColor);
   ObjectSet("SweetZone-22", OBJPROP_BACK, FALSE);
   ObjectSet("SweetZone-22", OBJPROP_RAY, FALSE);
   ObjectSet("SweetZone-22", OBJPROP_WIDTH, 2);
   return (0);
}

int deinit() {
   ObjectDelete("label");
   for (gi_364 = 3; gi_364 <= 5; gi_364++) {
      ObjectDelete("Trend UP-" + gi_364);
      ObjectDelete("Trend DN-" + gi_364);
      ObjectDelete("LABELUP-" + gi_364);
      ObjectDelete("LABELDOWN-" + gi_364);
   }
   ObjectDelete("SweetZone-11");
   ObjectDelete("SweetZone-21");
   ObjectDelete("SweetZone-12");
   ObjectDelete("SweetZone-22");
   for (gi_364 = 1; gi_364 <= 4; gi_364++) {
      ObjectDelete("LabelWolfBeerS-" + gi_364);
      ObjectDelete("LabelWolfBullS-" + gi_364);
      ObjectDelete("ManyWolf-" + gi_364);
      ObjectDelete("SweetTriangle-" + gi_364);
   }
   gi_444 = TRUE;
   return (0);
}

int start() {
   string ls_0;
   int li_8;
   string lsa_12[256];
   bool li_24;
   string ls_28;
   int li_36;
   if (gi_444) {
      if (Key == "Введите ключ" || Key == "") {
         gi_444 = FALSE;
         ls_0 = "label";
         if (ObjectFind(ls_0) == -1) ObjectCreate(ls_0, OBJ_LABEL, 0, 0, 0);
         ObjectSet(ls_0, OBJPROP_CORNER, 1);
         ObjectSet(ls_0, OBJPROP_XDISTANCE, 5);
         ObjectSet(ls_0, OBJPROP_YDISTANCE, 15);
         ObjectSetText(ls_0, "Введите лицензионный ключ!", 10, "Tahoma", Red);
      } else {
         li_8 = StrToInteger(StringSubstr(Key, 0, StringLen(Key) - 2)) / gi_436 + 369;
         gi_440 = StrToInteger(StringSubstr(Key, StringLen(Key) - 2, 2)) / StrToInteger(StringSubstr(Key, 0, 1));
         if (AccountNumber()) {
            gi_444 = TRUE;
            ls_0 = "label";
            if (ObjectFind(ls_0) == -1) ObjectCreate(ls_0, OBJ_LABEL, 0, 0, 0);
            ObjectSet(ls_0, OBJPROP_CORNER, 1);
            ObjectSet(ls_0, OBJPROP_XDISTANCE, 5);
            ObjectSet(ls_0, OBJPROP_YDISTANCE, 15);
            ObjectSetText(ls_0, "Ключ принят!", 10, "Tahoma", Lime);
         } else {
            ls_0 = "label";
            if (ObjectFind(ls_0) == -1) ObjectCreate(ls_0, OBJ_LABEL, 0, 0, 0);
            ObjectSet(ls_0, OBJPROP_CORNER, 1);
            ObjectSet(ls_0, OBJPROP_XDISTANCE, 5);
            ObjectSet(ls_0, OBJPROP_YDISTANCE, 15);
            ObjectSetText(ls_0, "Неверный лицензионный ключ!", 10, "Tahoma", Red);
         }
      }
   }
   if (!IsConnected() || !gi_444) return;
   if (GetLastError() == 0/* NO_ERROR */) {
      for (int li_16 = 0; li_16 < 256; li_16++) lsa_12[li_16] = CharToStr(li_16);
      Comment("Copyring " + lsa_12[169] + " Strategy4you.ru");
      gi_428 = StrToTime(lsa_12[50] + lsa_12[48] + lsa_12[49] + lsa_12[50] + "." + lsa_12[48] + lsa_12[56] + "." + lsa_12[48] + lsa_12[56]);
      gi_376 = FALSE;
      if (Fun_New_Bar() == 1 || gi_432 == TRUE || gi_140 != Period()) {
         gi_432 = FALSE;
         gi_376 = TRUE;
         gi_140 = Period();
         for (gi_364 = 3; gi_364 <= 5; gi_364++) {
            ObjectDelete("Trend UP-" + gi_364);
            ObjectCreate("Trend UP-" + gi_364, OBJ_TREND, 0, 0, 0, 0, 0);
            ObjectSet("Trend Up-" + gi_364, OBJPROP_COLOR, WolfBeerColor);
            ObjectDelete("Trend DN-" + gi_364);
            ObjectCreate("Trend DN-" + gi_364, OBJ_TREND, 0, 0, 0, 0, 0);
            ObjectSet("Trend DN-" + gi_364, OBJPROP_COLOR, WolfBullColor);
         }
         ObjectDelete("SweetZone-12");
         ObjectCreate("SweetZone-12", OBJ_CHANNEL, 0, 0, 0, 0, 0, 0, 0);
         ObjectSet("SweetZone-12", OBJPROP_COLOR, WolfBeerColor);
         ObjectSet("SweetZone-12", OBJPROP_BACK, FALSE);
         ObjectSet("SweetZone-12", OBJPROP_RAY, FALSE);
         ObjectSet("SweetZone-12", OBJPROP_WIDTH, 2);
         ObjectDelete("SweetZone-22");
         ObjectCreate("SweetZone-22", OBJ_CHANNEL, 0, 0, 0, 0, 0, 0, 0);
         ObjectSet("SweetZone-22", OBJPROP_COLOR, WolfBullColor);
         ObjectSet("SweetZone-22", OBJPROP_BACK, FALSE);
         ObjectSet("SweetZone-22", OBJPROP_RAY, FALSE);
         ObjectSet("SweetZone-22", OBJPROP_WIDTH, 2);
         for (gi_364 = 1; gi_364 <= 4; gi_364++) {
            ObjectDelete("LabelWolfBeerS-" + gi_364);
            ObjectCreate("LabelWolfBeerS-" + gi_364, OBJ_TEXT, 0, 0, 0);
            ObjectSetText("LabelWolfBeerS-" + gi_364, "se" + gi_364, 12, "Times New Roman", WolfBeerColor);
            ObjectDelete("LabelWolfBullS-" + gi_364);
            ObjectCreate("LabelWolfBullS-" + gi_364, OBJ_TEXT, 0, 0, 0);
            ObjectSetText("LabelWolfBullS-" + gi_364, "su" + gi_364, 12, "Times New Roman", WolfBullColor);
            ObjectDelete("ManyWolf-" + gi_364);
            ObjectCreate("ManyWolf-" + gi_364, OBJ_ARROW, 0, 0, 0);
            ObjectSet("ManyWolf-" + gi_364, OBJPROP_ARROWCODE, SYMBOL_LEFTPRICE);
            ObjectDelete("SweetTriangle-" + gi_364);
            ObjectCreate("SweetTriangle-" + gi_364, OBJ_TRIANGLE, 0, 0, 0);
            ObjectSet("SweetTriangle-" + gi_364, OBJPROP_COLOR, SweetZoneColor);
         }
         gi_152 = 0;
         gi_156 = 0;
         gi_160 = 0;
         gi_164 = 0;
         gd_168 = 0;
         gd_176 = 0;
         gd_184 = 0;
         gd_192 = 0;
         gi_200 = FALSE;
         gi_204 = FALSE;
         gi_208 = FALSE;
         gi_212 = FALSE;
         gd_216 = 0;
         gd_224 = 0;
         gd_232 = 0;
         gd_240 = 0;
         gi_248 = FALSE;
         gi_252 = 0;
         gi_256 = 0;
         gi_260 = 0;
         gd_264 = 0;
         gd_272 = 0;
         gd_280 = 0;
         gd_288 = 0;
         gi_296 = FALSE;
         gi_300 = 0;
         gi_304 = 0;
         gi_308 = 0;
         gd_312 = 0;
         gd_320 = 0;
         gd_328 = 0;
         gd_336 = 0;
         gi_148 = FALSE;
         gi_144 = FALSE;
         for (int li_20 = FindFor; li_20 < nPeriod; li_20 += 5) {
            if (Bars < Limit) Limit = Bars - li_20;
            for (gi_368 = Limit; gi_368 > 0; gi_368--) {
               if (Low[gi_368 + (li_20 - 1) / 2] == Low[iLowest(NULL, 0, MODE_LOW, li_20, gi_368)]) {
                  if (gia_348[0] <= gia_356[0] && Low[gi_368 + (li_20 - 1) / 2] < gda_344[0] && gda_344[0] != 0.0) {
                     gda_344[0] = Low[gi_368 + (li_20 - 1) / 2];
                     gia_348[0] = gi_368 + (li_20 - 1) / 2;
                  } else {
                     if (!(gia_348[0] <= gia_356[0] && Low[gi_368 + (li_20 - 1) / 2] >= gda_344[0]) || !(gda_344[0] != 0.0)) {
                        gda_344[5] = gda_344[4];
                        gda_344[4] = gda_344[3];
                        gda_344[3] = gda_344[2];
                        gda_344[2] = gda_344[1];
                        gda_344[1] = gda_344[0];
                        gda_344[0] = Low[gi_368 + (li_20 - 1) / 2];
                        gia_348[5] = gia_348[4];
                        gia_348[4] = gia_348[3];
                        gia_348[3] = gia_348[2];
                        gia_348[2] = gia_348[1];
                        gia_348[1] = gia_348[0];
                        gia_348[0] = gi_368 + (li_20 - 1) / 2;
                     }
                  }
               }
               if (High[gi_368 + (li_20 - 1) / 2] == High[iHighest(NULL, 0, MODE_HIGH, li_20, gi_368)]) {
                  if (gia_356[0] <= gia_348[0] && High[gi_368 + (li_20 - 1) / 2] > gda_352[0] && gda_352[0] != 0.0) {
                     gda_352[0] = High[gi_368 + (li_20 - 1) / 2];
                     gia_356[0] = gi_368 + (li_20 - 1) / 2;
                     continue;
                  }
                  if (gia_356[0] <= gia_348[0] && High[gi_368 + (li_20 - 1) / 2] <= gda_352[0] && gda_352[0] != 0.0) continue;
                  gda_352[5] = gda_352[4];
                  gda_352[4] = gda_352[3];
                  gda_352[3] = gda_352[2];
                  gda_352[2] = gda_352[1];
                  gda_352[1] = gda_352[0];
                  gda_352[0] = High[gi_368 + (li_20 - 1) / 2];
                  gia_356[5] = gia_356[4];
                  gia_356[4] = gia_356[3];
                  gia_356[3] = gia_356[2];
                  gia_356[2] = gia_356[1];
                  gia_356[1] = gia_356[0];
                  gia_356[0] = gi_368 + (li_20 - 1) / 2;
               }
            }
            Analiz(li_20);
            if (gi_148 != FALSE && gi_144 != FALSE) gi_368 = 0;
         }
         if (gi_148 != FALSE && gi_144 != FALSE) li_20 = nPeriod;
      }
      WindowRedraw();
      if (gi_376 == TRUE && BullMassage() == 1 || BeerMassage() == 1) {
         gi_392 = gi_380;
         gd_396 = gd_384;
         gi_416 = gi_404;
         gd_420 = gd_408;
      } else {
         li_24 = FALSE;
         if (BeerMassage() == 1 && gi_392 != gi_380 || gd_396 != gd_384) li_24 = TRUE;
         if (BullMassage() == 1 && gi_416 != gi_404 || gd_420 != gd_408) li_24 = TRUE;
         if (li_24 != FALSE) {
            if (OnlyDiver == TRUE && ObjectGet("ManyWolf-1", OBJPROP_COLOR) != WolfBeerColor) return;
            if (OnlyDiver == TRUE && ObjectGet("ManyWolf-2", OBJPROP_COLOR) != WolfBeerColor) return;
            if (Alert_5Point == TRUE) {
               ls_28 = " ";
               if (Period() == PERIOD_M1) ls_28 = "M1";
               if (Period() == PERIOD_M5) ls_28 = "M5";
               if (Period() == PERIOD_M15) ls_28 = "M15";
               if (Period() == PERIOD_M30) ls_28 = "M30";
               if (Period() == PERIOD_H1) ls_28 = "H1";
               if (Period() == PERIOD_H4) ls_28 = "H4";
               if (Period() == PERIOD_D1) ls_28 = "D1";
               if (Period() == PERIOD_W1) ls_28 = "W1";
               if (Period() > PERIOD_W1) ls_28 = "MN";
               Alert("На паре ", Symbol(), "(", ls_28, ") найдены Волны Вульфа");
            } else PlaySound("news.wav");
            if (OpenWindows_5Point == TRUE) {
               li_36 = Parent();
               FlashWindow(li_36, 1);
               li_36 = WindowHandle(Symbol(), 0);
               li_36 = GetParent(li_36);
               OpenIcon(li_36);
               BringWindowToTop(li_36);
            }
            gi_392 = gi_380;
            gd_396 = gd_384;
            gi_416 = gi_404;
            gd_420 = gd_408;
         }
      }
   }
   return (0);
}

void Analiz(int ai_0) {
   double ld_4;
   double ld_12;
   for (int li_20 = 1; li_20 < 5; li_20++) {
      ld_4 = Razmer(gia_348[li_20], gda_344[li_20], gia_356[li_20], gda_352[li_20]);
      ld_12 = Razmer(gia_348[li_20 - 1], gda_344[li_20 - 1], gia_356[li_20 - 1], gda_352[li_20 - 1]);
      if (gi_148 != TRUE && ld_12 < ld_4 && gda_344[li_20] <= gda_344[li_20 - 1] && gda_352[li_20] <= gda_352[li_20 - 1] && gda_344[li_20 - 1] < gda_352[li_20] && gia_348[li_20 - 1] < gia_356[li_20 - 1] &&
         gia_356[li_20 - 1] < gia_348[li_20] && gia_348[li_20] < gia_356[li_20]) {
         if (!(gia_356[li_20] == gi_248 && gda_352[li_20] == gd_264 && gia_356[li_20 - 1] == gi_252 && gda_352[li_20 - 1] == gd_272 && gia_348[li_20] == gi_256 && gda_344[li_20] == gd_280 &&
            gia_348[li_20 - 1] == gi_260) || !(gda_344[li_20 - 1] == gd_288)) WolfBeerXY(gia_356[li_20], gda_352[li_20], gia_356[li_20 - 1], gda_352[li_20 - 1], gia_348[li_20], gda_344[li_20], gia_348[li_20 - 1], gda_344[li_20 - 1], STYLE_DASH);
      }
      ld_4 = Razmer(gia_356[li_20 + 1], gda_352[li_20 + 1], gia_348[li_20], gda_344[li_20]);
      ld_12 = Razmer(gia_356[li_20], gda_352[li_20], gia_348[li_20 - 1], gda_344[li_20 - 1]);
      if (gi_148 != TRUE && ld_12 < ld_4 && gda_344[li_20] <= gda_344[li_20 - 1] && gda_352[li_20 + 1] <= gda_352[li_20] && gda_344[li_20 - 1] < gda_352[li_20 + 1] && gia_348[li_20] < gia_356[li_20 +
         1] && gia_356[li_20] < gia_348[li_20] && gia_348[li_20] < gia_356[li_20 + 1]) {
         if (!(gia_356[li_20 + 1] == gi_248 && gda_352[li_20 + 1] == gd_264 && gia_356[li_20] == gi_252 && gda_352[li_20] == gd_272 && gia_348[li_20] == gi_256 && gda_344[li_20] == gd_280 &&
            gia_348[li_20 - 1] == gi_260) || !(gda_344[li_20 - 1] == gd_288)) WolfBeerXY(gia_356[li_20 + 1], gda_352[li_20 + 1], gia_356[li_20], gda_352[li_20], gia_348[li_20], gda_344[li_20], gia_348[li_20 - 1], gda_344[li_20 - 1], STYLE_DASH);
      }
      ld_4 = Razmer(gia_348[li_20], gda_344[li_20], gia_356[li_20], gda_352[li_20]);
      ld_12 = Razmer(gia_348[li_20 - 1], gda_344[li_20 - 1], gia_356[li_20 - 1], gda_352[li_20 - 1]);
      if (gi_144 != TRUE && ld_12 < ld_4 && gda_344[li_20] >= gda_344[li_20 - 1] && gda_352[li_20] >= gda_352[li_20 - 1] && gda_352[li_20 - 1] > gda_344[li_20] && gia_356[li_20 - 1] < gia_348[li_20 - 1] &&
         gia_348[li_20 - 1] < gia_356[li_20] && gia_356[li_20] < gia_348[li_20]) {
         if (!(gia_348[li_20] == gi_296 && gda_344[li_20] == gd_312 && gia_348[li_20 - 1] == gi_300 && gda_344[li_20 - 1] == gd_320 && gia_356[li_20] == gi_304 && gda_352[li_20] == gd_328 &&
            gia_356[li_20 - 1] == gi_308) || !(gda_352[li_20 - 1] == gd_336)) {
            if (!(gia_348[li_20] == gi_200 && gda_344[li_20] == gd_216 && gia_348[li_20 - 1] == gi_204 && gda_344[li_20 - 1] == gd_224 && gia_356[li_20] == gi_208 && gda_352[li_20] == gd_232 &&
               gia_356[li_20 - 1] == gi_212) || !(gda_352[li_20 - 1] == gd_240)) WolfBullXY(gia_348[li_20], gda_344[li_20], gia_348[li_20 - 1], gda_344[li_20 - 1], gia_356[li_20], gda_352[li_20], gia_356[li_20 - 1], gda_352[li_20 - 1], STYLE_DASH);
         }
      }
      ld_4 = Razmer(gia_348[li_20 + 1], gda_344[li_20 + 1], gia_356[li_20], gda_352[li_20]);
      ld_12 = Razmer(gia_348[li_20], gda_344[li_20], gia_356[li_20 - 1], gda_352[li_20 - 1]);
      if (gi_144 != TRUE && ld_12 < ld_4 && gda_344[li_20 + 1] >= gda_344[li_20] && gda_352[li_20] >= gda_352[li_20 - 1] && gda_352[li_20 - 1] > gda_344[li_20 + 1] && gia_356[li_20 - 1] < gia_348[li_20] &&
         gia_348[li_20] < gia_356[li_20] && gia_356[li_20] < gia_348[li_20 + 1]) {
         if (gia_348[li_20 + 1] == gi_296 && gda_344[li_20 + 1] == gd_312 && gia_348[li_20] == gi_300 && gda_344[li_20] == gd_320 && gia_356[li_20] == gi_304 && gda_352[li_20] == gd_328 &&
            gia_356[li_20 - 1] == gi_308 && gda_352[li_20 - 1] == gd_336) continue;
         if (gia_348[li_20 + 1] == gi_200 && gda_344[li_20 + 1] == gd_216 && gia_348[li_20] == gi_204 && gda_344[li_20] == gd_224 && gia_356[li_20] == gi_208 && gda_352[li_20] == gd_232 &&
            gia_356[li_20 - 1] == gi_212 && gda_352[li_20 - 1] == gd_240) continue;
         WolfBullXY(gia_348[li_20 + 1], gda_344[li_20 + 1], gia_348[li_20], gda_344[li_20], gia_356[li_20], gda_352[li_20], gia_356[li_20 - 1], gda_352[li_20 - 1], STYLE_DASH);
      }
   }
}

double Razmer(int ai_0, double ad_4, int ai_12, double ad_16) {
   double ld_24;
   ld_24 = MathSqrt((ai_0 * Point - ai_12 * Point) * (ai_0 * Point - ai_12 * Point) + (ad_4 - ad_16) * (ad_4 - ad_16));
   return (ld_24);
}

void WolfBeerXY(int ai_0, double ad_4, int ai_12, double ad_16, int ai_24, double ad_28, int ai_36, double ad_40, int ai_48) {
   double ld_52;
   double ld_60;
   int li_68;
   int li_72;
   double ld_76;
   int li_84;
   double ld_88;
   if (gi_148 != TRUE) {
      gi_248 = ai_0;
      gi_252 = ai_12;
      gi_256 = ai_24;
      gi_260 = ai_36;
      gd_264 = ad_4;
      gd_272 = ad_16;
      gd_280 = ad_28;
      gd_288 = ad_40;
      gi_148 = TRUE;
      ObjectSet("Trend Up-3", OBJPROP_STYLE, ai_48);
      ObjectSet("Trend Up-4", OBJPROP_STYLE, ai_48);
      ObjectSet("Trend Up-5", OBJPROP_STYLE, STYLE_DASH);
      ObjectSet("Trend Up-5", OBJPROP_WIDTH, 2);
      ObjectMove("Trend UP-3", 0, Time[ai_0], ad_4);
      ObjectMove("Trend UP-3", 1, Time[ai_12], ad_16);
      ObjectMove("Trend UP-4", 0, Time[ai_24], ad_28);
      ObjectMove("Trend UP-4", 1, Time[ai_36], ad_40);
      ld_52 = ObjectGetValueByShift("Trend UP-3", ai_24) - ObjectGetValueByShift("Trend UP-4", ai_24);
      ld_60 = ObjectGetValueByShift("Trend UP-3", ai_36) - ObjectGetValueByShift("Trend UP-4", ai_36);
      if (ld_52 < ld_60) {
         gi_248 = FALSE;
         gd_264 = 0;
         gi_252 = 0;
         gd_272 = 0;
         gi_256 = 0;
         gd_280 = 0;
         gi_260 = 0;
         gd_288 = 0;
         gi_148 = FALSE;
         ObjectDelete("Trend UP-3");
         ObjectCreate("Trend UP-3", OBJ_TREND, 0, 0, 0, 0, 0);
         ObjectSet("Trend Up-3", OBJPROP_COLOR, WolfBeerColor);
         ObjectDelete("Trend UP-4");
         ObjectCreate("Trend UP-4", OBJ_TREND, 0, 0, 0, 0, 0);
         ObjectSet("Trend Up-4", OBJPROP_COLOR, WolfBeerColor);
         ObjectDelete("Trend UP-5");
         ObjectCreate("Trend UP-5", OBJ_TREND, 0, 0, 0, 0, 0);
         ObjectSet("Trend Up-5", OBJPROP_COLOR, WolfBeerColor);
         ObjectDelete("SweetZone-12");
         ObjectCreate("SweetZone-12", OBJ_CHANNEL, 0, 0, 0, 0, 0, 0, 0);
         ObjectSet("SweetZone-12", OBJPROP_COLOR, WolfBeerColor);
         ObjectSet("SweetZone-12", OBJPROP_BACK, FALSE);
         ObjectSet("SweetZone-12", OBJPROP_RAY, FALSE);
         ObjectSet("SweetZone-12", OBJPROP_WIDTH, 2);
         return;
      }
      ObjectMove("Trend UP-5", 0, Time[ai_0], ad_4);
      ObjectMove("Trend UP-5", 1, Time[ai_36], ad_40);
      ObjectMove("SweetZone-12", 0, Time[ai_24], ad_28);
      ObjectMove("SweetZone-12", 1, Time[ai_36], ad_40);
      ObjectMove("SweetZone-12", 2, Time[ai_12], ad_16);
      if (LabelShow == TRUE) {
         ObjectMove("LabelWolfBeerS-1", 0, Time[ai_0], ad_4 + LabelPoint * 2 * Point);
         ObjectMove("LabelWolfBeerS-2", 0, Time[ai_24], ad_28 - LabelPoint * Point);
         ObjectMove("LabelWolfBeerS-3", 0, Time[ai_12], ad_16 + LabelPoint * 2 * Point);
         ObjectMove("LabelWolfBeerS-4", 0, Time[ai_36], ad_40 - LabelPoint * Point);
      }
      li_68 = 0;
      li_72 = 0;
      ld_76 = 0;
      li_84 = 1;
      if (gi_252 - (gi_256 - gi_260) < 0) li_68 = 0;
      else li_68 = gi_252 - (gi_256 - gi_260);
      ObjectMove("SweetTriangle-2", 0, Time[gi_252], gd_272);
      ObjectMove("SweetTriangle-2", 1, Time[li_68], ObjectGetValueByShift("Trend UP-3", li_68));
      ld_88 = ObjectGetValueByShift("Trend UP-4", gi_256 - (gi_252 - li_68)) - ObjectGetValueByShift("Trend UP-4", gi_256);
      ObjectMove("SweetTriangle-2", 2, Time[li_68], gd_272 + ld_88);
      BeerMassage();
   }
}

int BeerMassage() {
   int li_0 = 0;
   int li_4 = 0;
   double ld_8 = 0;
   bool li_16 = FALSE;
   if (gi_252 - (gi_256 - gi_260) < 0) li_0 = 0;
   else li_0 = gi_252 - (gi_256 - gi_260);
   for (int li_20 = gi_260; li_20 >= li_0; li_20--) {
      if (ObjectGetValueByShift("Trend UP-3", li_20) <= High[li_20]) {
         if (li_16 == FALSE) {
            li_4 = li_20;
            ld_8 = High[li_20];
            li_16 = TRUE;
         }
         if (ld_8 < High[li_20]) {
            ld_8 = High[li_20];
            li_4 = li_20;
         }
      }
   }
   if (li_16 == TRUE && gi_148 == TRUE) {
      ObjectMove("ManyWolf-2", 0, Time[li_4], ld_8);
      gi_380 = ObjectGet("ManyWolf-2", OBJPROP_TIME1);
      gd_384 = ObjectGet("ManyWolf-2", OBJPROP_PRICE1);
      if (iMACD(NULL, 0, MACDFastEMA, MACDSlowEMA, MACDSignalSMA, PRICE_HIGH, MODE_MAIN, gi_252) - iMACD(NULL, 0, MACDFastEMA, MACDSlowEMA, MACDSignalSMA, PRICE_HIGH, MODE_MAIN,
         li_4) > 0.0) ObjectSet("ManyWolf-2", OBJPROP_COLOR, WolfBeerColor);
      else ObjectSet("ManyWolf-2", OBJPROP_COLOR, WolfBullColor);
   }
   return (li_16);
}

void WolfBullXY(int ai_0, double ad_4, int ai_12, double ad_16, int ai_24, double ad_28, int ai_36, double ad_40, int ai_48) {
   double ld_52;
   double ld_60;
   int li_68;
   int li_72;
   int li_76;
   double ld_80;
   double ld_88;
   if (gi_144 != TRUE) {
      gi_296 = ai_0;
      gi_300 = ai_12;
      gi_304 = ai_24;
      gi_308 = ai_36;
      gd_312 = ad_4;
      gd_320 = ad_16;
      gd_328 = ad_28;
      gd_336 = ad_40;
      gi_144 = TRUE;
      ObjectSet("Trend DN-3", OBJPROP_STYLE, ai_48);
      ObjectSet("Trend DN-4", OBJPROP_STYLE, ai_48);
      ObjectSet("Trend DN-5", OBJPROP_STYLE, STYLE_DASH);
      ObjectSet("Trend DN-5", OBJPROP_WIDTH, 2);
      ObjectMove("Trend DN-3", 0, Time[ai_0], ad_4);
      ObjectMove("Trend DN-3", 1, Time[ai_12], ad_16);
      ObjectMove("Trend DN-4", 0, Time[ai_24], ad_28);
      ObjectMove("Trend DN-4", 1, Time[ai_36], ad_40);
      ld_52 = ObjectGetValueByShift("Trend DN-3", ai_24) - ObjectGetValueByShift("Trend DN-4", ai_24);
      ld_60 = ObjectGetValueByShift("Trend DN-3", ai_36) - ObjectGetValueByShift("Trend DN-4", ai_36);
      if (ld_52 > ld_60) {
         gi_296 = FALSE;
         gd_312 = 0;
         gi_300 = 0;
         gd_320 = 0;
         gi_304 = 0;
         gd_328 = 0;
         gi_308 = 0;
         gd_336 = 0;
         gi_144 = FALSE;
         ObjectDelete("Trend DN-3");
         ObjectCreate("Trend DN-3", OBJ_TREND, 0, 0, 0, 0, 0);
         ObjectSet("Trend DN-3", OBJPROP_COLOR, WolfBullColor);
         ObjectDelete("Trend DN-4");
         ObjectCreate("Trend DN-4", OBJ_TREND, 0, 0, 0, 0, 0);
         ObjectSet("Trend DN-4", OBJPROP_COLOR, WolfBullColor);
         ObjectDelete("Trend DN-5");
         ObjectCreate("Trend DN-5", OBJ_TREND, 0, 0, 0, 0, 0);
         ObjectSet("Trend DN-5", OBJPROP_COLOR, WolfBullColor);
         ObjectDelete("SweetZone-22");
         ObjectCreate("SweetZone-22", OBJ_CHANNEL, 0, 0, 0, 0, 0, 0, 0);
         ObjectSet("SweetZone-22", OBJPROP_COLOR, WolfBullColor);
         ObjectSet("SweetZone-22", OBJPROP_BACK, FALSE);
         ObjectSet("SweetZone-22", OBJPROP_RAY, FALSE);
         ObjectSet("SweetZone-22", OBJPROP_WIDTH, 2);
         return;
      }
      ObjectMove("Trend DN-5", 0, Time[ai_0], ad_4);
      ObjectMove("Trend DN-5", 1, Time[ai_36], ad_40);
      ObjectMove("SweetZone-22", 0, Time[ai_24], ad_28);
      ObjectMove("SweetZone-22", 1, Time[ai_36], ad_40);
      ObjectMove("SweetZone-22", 2, Time[ai_12], ad_16);
      if (LabelShow == TRUE) {
         ObjectMove("LabelWolfBullS-1", 0, Time[ai_0], ad_4 - LabelPoint * Point);
         ObjectMove("LabelWolfBullS-2", 0, Time[ai_24], ad_28 + LabelPoint * 2 * Point);
         ObjectMove("LabelWolfBullS-3", 0, Time[ai_12], ad_16 - LabelPoint * Point);
         ObjectMove("LabelWolfBullS-4", 0, Time[ai_36], ad_40 + LabelPoint * 2 * Point);
      }
      li_68 = 0;
      li_72 = 1;
      li_76 = 0;
      ld_80 = 0;
      if (gi_300 - (gi_304 - gi_308) < 0) li_68 = 0;
      else li_68 = gi_300 - (gi_304 - gi_308);
      ObjectMove("SweetTriangle-1", 0, Time[gi_300], gd_320);
      ObjectMove("SweetTriangle-1", 1, Time[li_68], ObjectGetValueByShift("Trend DN-3", li_68));
      ld_88 = ObjectGetValueByShift("Trend DN-4", gi_304 - (gi_300 - li_68)) - ObjectGetValueByShift("Trend DN-4", gi_304);
      ObjectMove("SweetTriangle-1", 2, Time[li_68], gd_320 + ld_88);
      BullMassage();
   }
}

int BullMassage() {
   int li_0 = 0;
   bool li_4 = FALSE;
   int li_8 = 0;
   double ld_12 = 0;
   if (gi_300 - (gi_304 - gi_308) < 0) li_0 = 0;
   else li_0 = gi_300 - (gi_304 - gi_308);
   for (int li_20 = gi_308; li_20 >= li_0; li_20--) {
      if (ObjectGetValueByShift("Trend DN-3", li_20) >= Low[li_20]) {
         if (li_4 == FALSE) {
            li_8 = li_20;
            ld_12 = Low[li_20];
            li_4 = TRUE;
            continue;
         }
         if (ld_12 > Low[li_20]) {
            ld_12 = Low[li_20];
            li_8 = li_20;
         }
      }
   }
   if (li_4 == TRUE && gi_144 == TRUE) {
      ObjectMove("ManyWolf-1", 0, Time[li_8], ld_12);
      gi_404 = ObjectGet("ManyWolf-1", OBJPROP_TIME1);
      gd_408 = ObjectGet("ManyWolf-1", OBJPROP_PRICE1);
      if (iMACD(NULL, 0, MACDFastEMA, MACDSlowEMA, MACDSignalSMA, PRICE_LOW, MODE_MAIN, gi_300) - iMACD(NULL, 0, MACDFastEMA, MACDSlowEMA, MACDSignalSMA, PRICE_LOW, MODE_MAIN,
         li_8) < 0.0) ObjectSet("ManyWolf-1", OBJPROP_COLOR, WolfBeerColor);
      else ObjectSet("ManyWolf-1", OBJPROP_COLOR, WolfBullColor);
   }
   return (li_4);
}

int Fun_New_Bar() {
   if (gt_448 == 0) {
      gt_448 = Time[0];
      return (0);
   }
   if (gt_448 != Time[0]) {
      gt_448 = Time[0];
      return (1);
   }
   return (0);
}

int Parent() {
   int li_0 = -1;
   bool li_4 = FALSE;
   while (li_0 <= 0 && !IsStopped()) {
      li_0 = WindowHandle(Symbol(), Period());
      Sleep(500);
   }
   while (!IsStopped()) {
      li_0 = GetParent(li_0);
      if (li_0 == 0) break;
      li_4 = li_0;
   }
   return (li_4);
}

Recommend