Time: 2012-02-14 | Download file:Ganns_Signal_Trend_mtf_mod.mq4
/* Generated by ex4-to-mq4 decompiler FREEWARE 4.0.451.7 Website: Ht TP : / / ww W .MeT aq U o t E S. N E T E-mail : sU pP o r T@ M e T aQUo t e S.n Et */ #property copyright "Martin Lemire, phover " #property link "mlemire12@videotron.ca " #property indicator_separate_window #property indicator_minimum 0.0 #property indicator_maximum 0.08 #property indicator_buffers 2 #property indicator_color1 Lime #property indicator_color2 Red string Gs_unused_76 = "TheSecretTR"; extern int TimeFrame=0; extern int ADX_period = 3; extern int MOM_period = 3; extern int MACD_fast_ema = 3; extern int MACD_slow_ema = 5; extern int MACD_signal_period = 9; extern int MaxBarsOnGraph = 2000; double G_ibuf_108[]; double G_ibuf_112[]; double Gda_116[]; double Gda_120[]; double Gda_124[]; double Gda_128[]; double Gda_132[]; double Gda_136[]; double G_iadx_140; double G_iadx_148; double G_iadx_156; double G_imomentum_164; double G_imacd_172; int G_bars_180; int Gi_184; int Gi_188; int Gi_192; int Gi_196; int Gi_200; int Gi_204; int G_datetime_208; int G_datetime_212; int G_datetime_216; int Gi_unused_220; int Gi_224 = 0; int Gi_228; int Gi_232; int Gi_unused_236 = -1; string Gs_dummy_240; string Gs_248 = "Ganns Signal"; string Gs_dummy_256; // E37F0136AA3FFAF149B351F6A4C948E9 int init() { IndicatorShortName(Gs_248); SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 3); SetIndexArrow(0, 112); SetIndexBuffer(0, G_ibuf_108); SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 3); SetIndexArrow(1, 112); SetIndexBuffer(1, G_ibuf_112); SetIndexEmptyValue(0, 0); SetIndexEmptyValue(1, 0); G_datetime_208 = 0; G_datetime_212 = 0; G_datetime_216 = 0; Gi_unused_220 = 0; switch(TimeFrame) { case 1 : string TimeFrameStr="Period_M1"; break; case 5 : TimeFrameStr="Period_M5"; break; case 15 : TimeFrameStr="Period_M15"; break; case 30 : TimeFrameStr="Period_M30"; break; case 60 : TimeFrameStr="Period_H1"; break; case 240 : TimeFrameStr="Period_H4"; break; case 1440 : TimeFrameStr="Period_D1"; break; case 10080 : TimeFrameStr="Period_W1"; break; case 43200 : TimeFrameStr="Period_MN1"; break; default : TimeFrameStr="Current Timeframe"; } IndicatorShortName("Gs_248 ("+TimeFrameStr+")"); return (0); } // 52D46093050F38C27267BCE42543EF60 int deinit() { return (0); } // EA2B2676C28C0DB26D39331A336C6B92 int start() { Gi_224++; Gi_228 = IndicatorCounted(); if (Gi_228 < 0) return (-1); Gi_232 = WindowFind(Gs_248); if (G_bars_180 != Bars) f0_0(); if (Gi_228 > 0) Gi_228--; Gi_184 = G_bars_180 - Gi_228 - 1; if (Gi_184 > MaxBarsOnGraph) Gi_184 = MaxBarsOnGraph; for (Gi_188 = Gi_184 - 1; Gi_188 >= 0; Gi_188--) { G_iadx_140 = iADX(NULL, TimeFrame, ADX_period, PRICE_CLOSE, MODE_PLUSDI, iBarShift(NULL, 0, Time[Gi_188])); G_iadx_148 = iADX(NULL, TimeFrame, ADX_period, PRICE_CLOSE, MODE_MINUSDI, iBarShift(NULL, 0, Time[Gi_188])); G_iadx_156 = iADX(NULL, TimeFrame, ADX_period, PRICE_CLOSE, MODE_MAIN, iBarShift(NULL, 0, Time[Gi_188])); G_imomentum_164 = iMomentum(NULL, TimeFrame, MOM_period, PRICE_CLOSE, iBarShift(NULL, 0, Time[Gi_188])); G_imacd_172 = iMACD(NULL, TimeFrame, MACD_fast_ema, MACD_slow_ema, MACD_signal_period, PRICE_CLOSE, MODE_MAIN, iBarShift(NULL, 0, Time[Gi_188])); if (G_iadx_140 >= G_iadx_148) { Gda_116[Gi_188] = 0.1; if (Gi_192 == -1 || Gi_192 == 0) { Gi_192 = 1; G_datetime_208 = TimeCurrent(); } } if (G_iadx_140 < G_iadx_148) { Gda_120[Gi_188] = 0.1; if (Gi_192 == 1 || Gi_192 == 0) { Gi_192 = -1; G_datetime_208 = TimeCurrent(); } } if (G_imomentum_164 >= 100.0) { Gda_124[Gi_188] = 0.3; if (Gi_196 == -1 || Gi_196 == 0) { Gi_196 = 1; G_datetime_212 = TimeCurrent(); } } if (G_imomentum_164 < 100.0) { Gda_128[Gi_188] = 0.3; if (Gi_196 == 1 || Gi_196 == 0) { Gi_196 = -1; G_datetime_212 = TimeCurrent(); } } if (G_imacd_172 >= 0.0) { Gda_132[Gi_188] = 0.5; if (Gi_200 == -1 || Gi_200 == 0) { Gi_200 = 1; G_datetime_216 = TimeCurrent(); } } if (G_imacd_172 < 0.0) { Gda_136[Gi_188] = 0.5; if (Gi_200 == 1 || Gi_200 == 0) { Gi_200 = -1; G_datetime_216 = TimeCurrent(); } } if (Gi_192 == 1 && Gi_196 == 1 && Gi_200 == 1) Gi_204 = 1; if (Gi_192 == -1 && Gi_196 == -1 && Gi_200 == -1) Gi_204 = -1; if (Gi_204 == 1) G_ibuf_108[Gi_188] = 0.08; else G_ibuf_112[Gi_188] = 0.08; } WindowRedraw(); return (0); } // 09470FB701C11F8B07320EA009403A60 void f0_0() { G_bars_180 = Bars; Gi_228++; }