#property copyright "Copyright © 2008, 2009 Group Three LLC" #property link "forexprofitpro.com" #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 Teal #property indicator_color2 Coral #import "GomegaAuto.dll" int InitLicense(); int CheckLicense(); bool ShowConfigBox(); #import extern int BandsPeriod = 10; extern double BandsDeviations = 1.0; extern int ATRPeriod = 20; int gi_unused_92 = 5; int gi_96 = 0; double g_ibuf_100[]; double g_ibuf_104[]; 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(); SetIndexStyle(0, DRAW_LINE, EMPTY, 2); SetIndexBuffer(0, g_ibuf_100); SetIndexStyle(1, DRAW_LINE, EMPTY, 2); SetIndexBuffer(1, g_ibuf_104); SetIndexDrawBegin(0, BandsPeriod + gi_96); IndicatorShortName("Market Pulse"); SetIndexLabel(0, "BBWidth"); SetIndexLabel(1, "ATR"); 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; double ld_40; IsLicenseValid(); if (Bars <= BandsPeriod) return (0); int l_ind_counted_8 = IndicatorCounted(); if (l_ind_counted_8 < 1) { for (int li_0 = 1; li_0 <= BandsPeriod; li_0++) { g_ibuf_100[Bars - li_0] = EMPTY_VALUE; g_ibuf_104[Bars - li_0] = EMPTY_VALUE; } } int li_12 = Bars - l_ind_counted_8; if (l_ind_counted_8 > 0) li_12++; li_0 = Bars - BandsPeriod + 1; if (l_ind_counted_8 > BandsPeriod - 1) li_0 = Bars - l_ind_counted_8 - 1; while (li_0 >= 0) { ld_32 = 0.0; for (int li_4 = li_0 + BandsPeriod - 1; li_4 >= li_0; li_4--) { ld_40 = Close[li_4] - iMA(NULL, 0, BandsPeriod, gi_96, MODE_SMA, PRICE_CLOSE, li_0); ld_32 += ld_40 * ld_40; } g_ibuf_100[li_0] = 2.0 * BandsDeviations * MathSqrt(ld_32 / BandsPeriod); li_0--; } for (int li_48 = 0; li_48 < li_12; li_48++) g_ibuf_104[li_48] = iATR(NULL, 0, ATRPeriod, li_48); return (0); }