#property copyright "Copyright © 2008, 2009, Group Three LLC" #property link "forexprofitpro.com" #property indicator_chart_window #property indicator_buffers 4 #property indicator_color1 Green #property indicator_color2 Red #property indicator_color3 Green #property indicator_color4 LightCoral #import "GomegaAuto.dll" int InitLicense(); int CheckLicense(); bool ShowConfigBox(); #import extern int TakeProfit = 100; extern double RewToRisk = 1.0; extern double ADXThresh = 30.0; extern double MixITS = 0.25; extern double RndmnssThresh = 80.0; extern int MinATR_Pips = 13; int g_timeframe_116 = 0; double g_ibuf_120[]; double g_ibuf_124[]; double g_ibuf_128[]; double g_ibuf_132[]; double g_iatr_136; int g_bool_144; int g_bool_148; double gd_152; int init() { double ld_0; double ld_8; if (IsDllsAllowed() == FALSE) { Alert("Allow for DLL calls in the \'properties-->common\' popup window"); ld_0 = 0; ld_8 = 1 / ld_0; return (0); } int li_16 = InitLicense(); gd_152 = Point; if (Point == 0.001 || Point == 0.00001) gd_152 = 10.0 * Point; SetIndexStyle(0, DRAW_ARROW, EMPTY, 1); SetIndexStyle(1, DRAW_ARROW, EMPTY, 1); SetIndexStyle(2, DRAW_ARROW, EMPTY, 1); SetIndexStyle(3, DRAW_ARROW, EMPTY, 1); SetIndexEmptyValue(0, 0.0); SetIndexEmptyValue(1, 0.0); SetIndexEmptyValue(2, 0.0); SetIndexEmptyValue(3, 0.0); SetIndexArrow(0, 116); SetIndexArrow(1, 116); SetIndexArrow(2, SYMBOL_STOPSIGN); SetIndexArrow(3, SYMBOL_STOPSIGN); IndicatorDigits(Digits); SetIndexDrawBegin(0, 20); SetIndexDrawBegin(1, 20); SetIndexDrawBegin(2, 20); SetIndexDrawBegin(3, 20); IndicatorBuffers(5); SetIndexBuffer(0, g_ibuf_120); SetIndexBuffer(1, g_ibuf_124); SetIndexBuffer(2, g_ibuf_128); SetIndexBuffer(3, g_ibuf_132); SetIndexLabel(0, "Buy"); SetIndexLabel(1, "Sell"); SetIndexLabel(2, "Stop Long"); SetIndexLabel(3, "Stop Short"); return (0); } int deinit() { ObjectsDeleteAll(); Comment(" "); return (0); } void IsLicenseValid() { int li_8; int li_0 = 0; int li_4 = CheckLicense(); if (li_4 == -1) Comment("Connecting to the server..."); if (li_4 == 1) { ShowConfigBox(); Comment("Invalid License. Please contact Quantum"); li_8 = 1 / li_0; } } int start() { double ld_32; int li_4 = IndicatorCounted(); IsLicenseValid(); if (Bars <= 20) return (0); if (li_4 < 0) return (-1); if (li_4 > 0) li_4--; int li_0 = Bars - li_4; for (int li_88 = li_0; li_88 >= 0; li_88--) { XRSgnls(li_88); g_ibuf_120[li_88] = g_bool_144 * Open[li_88]; g_ibuf_124[li_88] = g_bool_148 * Open[li_88]; ld_32 = TakeProfit * gd_152 / RewToRisk; g_ibuf_128[li_88] = g_bool_144 * (Open[li_88] - ld_32); g_ibuf_132[li_88] = g_bool_148 * (Open[li_88] + ld_32); } return (0); } void XRSgnls(int ai_0) { double l_icustom_20 = iCustom(NULL, g_timeframe_116, "XRayM", 0, MixITS, 0, 0, ai_0); double l_icustom_28 = iCustom(NULL, g_timeframe_116, "XRayM", 0, MixITS, 0, 1, ai_0); double ld_124 = l_icustom_20 - l_icustom_28; double l_icustom_36 = iCustom(NULL, g_timeframe_116, "XRayM", 0, MixITS, 0, 0, ai_0 + 1); double l_icustom_44 = iCustom(NULL, g_timeframe_116, "XRayM", 0, MixITS, 0, 1, ai_0 + 1); double ld_132 = l_icustom_36 - l_icustom_44; double l_icustom_52 = iCustom(NULL, g_timeframe_116, "XRayM", 0, MixITS, 0, 0, ai_0 + 2); double l_icustom_60 = iCustom(NULL, g_timeframe_116, "XRayM", 0, MixITS, 0, 1, ai_0 + 2); double ld_140 = l_icustom_52 - l_icustom_60; double l_icustom_92 = iCustom(NULL, g_timeframe_116, "MarketPulse", 10, 1, 20, 0, ai_0 + 1); double l_icustom_100 = iCustom(NULL, g_timeframe_116, "MarketPulse", 10, 1, 20, 0, ai_0 + 2); double l_iadx_108 = iADX(NULL, g_timeframe_116, 5, PRICE_CLOSE, MODE_MAIN, ai_0 + 1); g_iatr_136 = iATR(NULL, g_timeframe_116, 20, ai_0 + 1); double l_icustom_84 = iCustom(NULL, g_timeframe_116, "Randomness", 5, RndmnssThresh, 0, ai_0 + 1); double ld_116 = 0.0; int l_bool_168 = ld_132 > ld_116 && ld_124 > ld_116 && ld_140 > 0.95 * ld_116 && ld_140 <= 0.95 * ld_132; int li_unused_172 = Open[ai_0 + 1] < Close[ai_0 + 1] && Open[ai_0 + 2] < Close[ai_0 + 2]; int li_176 = l_icustom_92 > 1.2 * g_iatr_136 && l_icustom_92 > 1.01 * l_icustom_100; int li_180 = l_iadx_108 > ADXThresh; int li_184 = g_iatr_136 > MinATR_Pips * gd_152; int li_188 = l_icustom_84 <= RndmnssThresh; g_bool_144 = l_bool_168 && li_176 && li_180 && li_184 && li_188; int li_196 = (-ld_132) > ld_116 && (-ld_124) > ld_116 && (-ld_140) > 0.95 * ld_116 && (-ld_140) <= -0.95 * ld_132; int li_unused_200 = Open[ai_0 + 1] > Close[ai_0 + 1] && Open[ai_0 + 2] > Close[ai_0 + 2]; int li_204 = li_176; int li_208 = li_180; int li_212 = li_184; int li_216 = li_188; g_bool_148 = li_196 && li_204 && li_208 && li_212 && li_216; }