Navigation:Home > Content >

forex_turbo_scalper.mq4

Time: 2017-03-06 | Download file:forex_turbo_scalper.mq4

#property copyright "Copyright © 2012, Rita Lasker"
#property link      "http://www.ritalasker.com"

#property indicator_separate_window
#property indicator_minimum 0.0
#property indicator_maximum 1.0
#property indicator_buffers 3
#property indicator_color1 Blue
#property indicator_color2 Red
#property indicator_color3 Orange

#include 

int g_period_76 = 7;
int g_period_80 = 10;
int g_slowing_84 = 4;
int g_price_field_88 = 0;
int g_ma_method_92 = MODE_SMA;
int gi_96 = 2212;
int gi_100 = 9;
int gi_104 = 1;
double g_ibuf_108[];
double g_ibuf_112[];
double g_ibuf_116[];
int g_datetime_120 = 0;

int init() {
   SetIndexStyle(0, DRAW_HISTOGRAM);
   SetIndexStyle(1, DRAW_HISTOGRAM);
   SetIndexStyle(2, DRAW_HISTOGRAM);
   SetIndexBuffer(0, g_ibuf_108);
   SetIndexBuffer(1, g_ibuf_116);
   SetIndexBuffer(2, g_ibuf_112);
   IndicatorShortName("Forex Turbo Scalper");
   SetIndexLabel(0, "Buy");
   SetIndexLabel(1, "Sell");
   SetIndexLabel(2, "Heed");
   return (0);
}

int deinit() {
   return (0);
}

int start() {
   int li_4;
   int file_8;
   int li_12;
   int li_16;
   int li_20;
   double istochastic_28;
   double istochastic_36;
   double istochastic_44;
   double istochastic_52;
   int li_60;
   string ls_64;
   string ls_72;
   string ls_80;
   bool li_0 = TRUE;
   if ((!IsTesting()) && !IsDemo()) {
      file_8 = FileOpen("FTSkey.dat", FILE_BIN|FILE_READ);
      if (file_8 > 0) {
         li_4 = FileReadInteger(file_8, LONG_VALUE);
         FileClose(file_8);
      }
      li_12 = 3.0 * MathSqrt(AccountNumber());
      /*if (li_4 + li_12 != 777777777) {
         MessageBox("NO VALID KEY! Contact Rita Lasker Support", NULL, MB_ICONEXCLAMATION);
         Comment("no valid key");
         li_0 = FALSE;
      }*/
   }
   if (li_0) {
      if (gi_96 < TimeYear(TimeCurrent())) {
         li_0 = FALSE;
         MessageBox("Your version is expired! Contact Rita Lasker Support ", NULL, MB_ICONEXCLAMATION);
         Comment("Your version is expired! Contact Rita Lasker Support");
         return (0);
      }
      if (gi_96 == TimeYear(TimeCurrent()) && gi_100 < TimeMonth(TimeCurrent())) {
         li_0 = FALSE;
         MessageBox("Your version is expired! Contact Rita Lasker Support ", NULL, MB_ICONEXCLAMATION);
         Comment("Your version is expired! Contact Rita Lasker Support");
         return (0);
      }
      if (gi_96 == TimeYear(TimeCurrent()) && gi_100 == TimeMonth(TimeCurrent()) && gi_104 <= TimeDay(TimeCurrent())) {
         li_0 = FALSE;
         MessageBox("Your version is expired! Contact Rita Lasker Support ", NULL, MB_ICONEXCLAMATION);
         Comment("Your version is expired! Contact Rita Lasker Support");
         return (0);
      }
   }
   if (li_0) {
      Comment("FTS");
      li_20 = IndicatorCounted();
      if (li_20 > 0) li_20--;
      li_16 = Bars - li_20;
      for (int shift_24 = 0; shift_24 < li_16; shift_24++) {
         istochastic_28 = iStochastic(Symbol(), 0, g_period_76, g_period_80, g_slowing_84, g_ma_method_92, g_price_field_88, MODE_MAIN, shift_24);
         istochastic_36 = iStochastic(Symbol(), 0, g_period_76, g_period_80, g_slowing_84, g_ma_method_92, g_price_field_88, MODE_MAIN, shift_24 + 1);
         istochastic_44 = iStochastic(Symbol(), 0, g_period_76, g_period_80, g_slowing_84, g_ma_method_92, g_price_field_88, MODE_SIGNAL, shift_24);
         istochastic_52 = iStochastic(Symbol(), 0, g_period_76, g_period_80, g_slowing_84, g_ma_method_92, g_price_field_88, MODE_SIGNAL, shift_24 + 1);
         if (istochastic_28 > istochastic_44 && istochastic_28 > istochastic_36) {
            g_ibuf_108[shift_24] = 1;
            g_ibuf_112[shift_24] = 0;
            g_ibuf_116[shift_24] = 0;
         } else {
            if (istochastic_28 > istochastic_44 && istochastic_28 < istochastic_36) {
               g_ibuf_112[shift_24] = 1;
               g_ibuf_108[shift_24] = 0;
               g_ibuf_116[shift_24] = 0;
            } else {
               if (istochastic_28 < istochastic_44 && istochastic_28 < istochastic_36) {
                  g_ibuf_116[shift_24] = 1;
                  g_ibuf_112[shift_24] = 0;
                  g_ibuf_108[shift_24] = 0;
               } else {
                  if (istochastic_28 < istochastic_44 && istochastic_28 > istochastic_36) {
                     g_ibuf_112[shift_24] = 1;
                     g_ibuf_108[shift_24] = 0;
                     g_ibuf_116[shift_24] = 0;
                  }
               }
            }
         }
      }
      if (f0_0()) {
         istochastic_28 = iStochastic(Symbol(), 0, g_period_76, g_period_80, g_slowing_84, g_ma_method_92, g_price_field_88, MODE_MAIN, 1);
         istochastic_36 = iStochastic(Symbol(), 0, g_period_76, g_period_80, g_slowing_84, g_ma_method_92, g_price_field_88, MODE_MAIN, 2);
         istochastic_44 = iStochastic(Symbol(), 0, g_period_76, g_period_80, g_slowing_84, g_ma_method_92, g_price_field_88, MODE_SIGNAL, 1);
         istochastic_52 = iStochastic(Symbol(), 0, g_period_76, g_period_80, g_slowing_84, g_ma_method_92, g_price_field_88, MODE_SIGNAL, 2);
         if (istochastic_28 > istochastic_44 && istochastic_36 < istochastic_52) {
            li_60 = Period();
            if (li_60 >= 60) {
               li_60 /= 60;
               ls_80 = " H" + li_60;
            } else ls_80 = " M" + li_60;
            ls_72 = "Forex Turbo Scalper" + " " + Symbol() + " " + ls_80 + " Buy";
            ls_64 = "FTS" + " " + Symbol() + " " + ls_80 + " Buy";
            Alert(ls_64);
            SendMail("FTS Alert", ls_72);
            PlaySound("expert.wav");
         }
         if (!(istochastic_28 < istochastic_44 && istochastic_36 > istochastic_52)) return (0);
         li_60 = Period();
         if (li_60 >= 60) {
            li_60 /= 60;
            ls_80 = " H" + li_60;
         } else ls_80 = " M" + li_60;
         ls_72 = "Forex Turbo Scalper" + " " + Symbol() + " " + ls_80 + " Sell";
         ls_64 = "FTS" + " " + Symbol() + " " + ls_80 + " Sell";
         Alert(ls_64);
         SendMail("FTS Alert", ls_72);
         PlaySound("expert.wav");
      }
   }
   return (0);
}

bool f0_0() {
   bool li_ret_0 = FALSE;
   if (g_datetime_120 != iTime(Symbol(), 0, 0)) {
      g_datetime_120 = iTime(Symbol(), 0, 0);
      li_ret_0 = TRUE;
   }
   return (li_ret_0);
}

Recommend