Navigation:Home > Content >

FX_Turbo_Marksman_EURUSD~.mq4

Time: 2014-04-08 | Download file:FX_Turbo_Marksman_EURUSD~.mq4

/*
   G e n e r a t e d  by ex4-to-mq4 decompiler FREEWARE 4.0.509.5
   Website: h t tp :/ /WW W . mE TAqUo T E s . Ne T
   E-mail :  sUP Po rt@m E TAQ u O Te S. NET
*/
#property copyright "Copyright © 2010, FX Turbo Marksman"
#property link      "http://www.fxturbomarksman.com"

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

int Gi_76 = 15;
int Gi_80 = 500;
extern bool SoundAlarm = TRUE;
extern bool EmailAlarm = FALSE;
double G_ibuf_92[];
double G_ibuf_96[];
bool Gi_100 = FALSE;
bool Gi_104 = FALSE;

int init() {
   IndicatorBuffers(2);
   SetIndexStyle(0, DRAW_ARROW);
   SetIndexArrow(0, 234);
   SetIndexStyle(1, DRAW_ARROW);
   SetIndexArrow(1, 233);
   SetIndexBuffer(0, G_ibuf_92);
   SetIndexBuffer(1, G_ibuf_96);
   GlobalVariableSet("AlertTime" + Symbol() + Period(), TimeCurrent());
   GlobalVariableSet("SignalType" + Symbol() + Period(), 5);
   return (0);
}

int deinit() {
   GlobalVariableDel("AlertTime" + Symbol() + Period());
   GlobalVariableDel("SignalType" + Symbol() + Period());
   return (0);
}

int start() {
   int Li_12;
   double Ld_52;
   double Ld_60;
   double Ld_76;
   double Ld_84;
   double Ld_92;
   double Ld_100;
   double Lda_108[1000];
   double Ld_120;
   if (Gi_80 >= 1000) Gi_80 = 950;
   SetIndexDrawBegin(0, Bars - Gi_80 + 11 + 1);
   SetIndexDrawBegin(1, Bars - Gi_80 + 11 + 1);
   int ind_counted_8 = IndicatorCounted();
   double Ld_112 = 0;
   int Li_20 = Gi_76 * 2 + 3;
   double Ld_36 = Gi_76 + 67;
   double Ld_44 = 33 - Gi_76;
   int period_24 = Li_20;
   if (Bars <= 12) return (0);
   if (ind_counted_8 < 12) {
      for (int Li_0 = 1; Li_0 <= 0; Li_0++) G_ibuf_92[Gi_80 - Li_0] = 0.0;
      for (Li_0 = 1; Li_0 <= 0; Li_0++) G_ibuf_96[Gi_80 - Li_0] = 0.0;
   }
   for (int Li_4 = Gi_80 - 11 - 1; Li_4 >= 0; Li_4--) {
      Li_12 = Li_4;
      Ld_76 = 0.0;
      Ld_84 = 0.0;
      for (Li_12 = Li_4; Li_12 <= Li_4 + 9; Li_12++) Ld_84 += MathAbs(High[Li_12] - Low[Li_12]);
      Ld_76 = Ld_84 / 10.0;
      Li_12 = Li_4;
      for (double Ld_68 = 0; Li_12 < Li_4 + 9 && Ld_68 < 1.0; Li_12++)
         if (MathAbs(Open[Li_12] - (Close[Li_12 + 1])) >= 2.0 * Ld_76) Ld_68 += 1.0;
      if (Ld_68 >= 1.0) Ld_92 = Li_12;
      else Ld_92 = -1;
      Li_12 = Li_4;
      for (Ld_68 = 0; Li_12 < Li_4 + 6 && Ld_68 < 1.0; Li_12++)
         if (MathAbs(Close[Li_12 + 3] - Close[Li_12]) >= 4.6 * Ld_76) Ld_68 += 1.0;
      if (Ld_68 >= 1.0) Ld_100 = Li_12;
      else Ld_100 = -1;
      if (Ld_92 > -1.0) period_24 = 3;
      else period_24 = Li_20;
      if (Ld_100 > -1.0) period_24 = 4;
      else period_24 = Li_20;
      Ld_52 = 100 - MathAbs(iWPR(NULL, 0, period_24, Li_4));
      Lda_108[Li_4] = Ld_52;
      G_ibuf_92[Li_4] = 0;
      G_ibuf_96[Li_4] = 0;
      Ld_60 = 0;
      if (Ld_52 < Ld_44) {
         for (int Li_16 = 1; Lda_108[Li_4 + Li_16] >= Ld_44 && Lda_108[Li_4 + Li_16] <= Ld_36; Li_16++) {
         }
         if (Lda_108[Li_4 + Li_16] > Ld_36) {
            Ld_60 = High[Li_4] + Ld_76 / 2.0;
            if (Li_4 == 1 && Gi_100 == FALSE) {
               Gi_100 = TRUE;
               Gi_104 = FALSE;
            }
            G_ibuf_92[Li_4] = Ld_60;
         }
      }
      if (Ld_52 > Ld_36) {
         for (Li_16 = 1; Lda_108[Li_4 + Li_16] >= Ld_44 && Lda_108[Li_4 + Li_16] <= Ld_36; Li_16++) {
         }
         if (Lda_108[Li_4 + Li_16] < Ld_44) {
            Ld_60 = Low[Li_4] - Ld_76 / 2.0;
            if (Li_4 == 1 && Gi_104 == FALSE) {
               Gi_104 = TRUE;
               Gi_100 = FALSE;
            }
            G_ibuf_96[Li_4] = Ld_60;
         }
      }
   }
   if (Gi_100 == TRUE && TimeCurrent() > GlobalVariableGet("AlertTime" + Symbol() + Period()) && GlobalVariableGet("SignalType" + Symbol() + Period()) != 0.0) {
      Ld_120 = High[iHighest(Symbol(), 0, MODE_HIGH, 3, 0)] + 5.0 * Point;
      if (SoundAlarm) Alert("Sell signal @ ", Symbol(), " Period ", Period(), " Stop Loss @", Ld_120);
      if (EmailAlarm) SendMail("Sell Signal FX Marksman", "Sell signal @ " + Symbol() + " Period " + Period() + " Stop Loss @ " + Ld_120);
      Ld_112 = TimeCurrent() + 60.0 * (Period() - MathMod(Minute(), Period()));
      GlobalVariableSet("AlertTime" + Symbol() + Period(), Ld_112);
      GlobalVariableSet("SignalType" + Symbol() + Period(), 0);
   }
   if (Gi_104 == TRUE && TimeCurrent() > GlobalVariableGet("AlertTime" + Symbol() + Period()) && GlobalVariableGet("SignalType" + Symbol() + Period()) != 1.0) {
      Ld_120 = Low[iLowest(Symbol(), 0, MODE_LOW, 3, 0)] - 5.0 * Point;
      if (SoundAlarm) Alert("Buy signal @ ", Symbol(), " Period ", Period(), " Stop Loss @", Ld_120);
      if (EmailAlarm) SendMail("BUY Signal FX Marksman", "Buy signal @ " + Symbol() + " Period " + Period() + " Stop Loss @ " + Ld_120);
      Ld_112 = TimeCurrent() + 60.0 * (Period() - MathMod(Minute(), Period()));
      GlobalVariableSet("AlertTime" + Symbol() + Period(), Ld_112);
      GlobalVariableSet("SignalType" + Symbol() + Period(), 1);
   }
   return (0);
}

Recommend