#property copyright "Copyright © 2008, TradeWays" #property link "http://www.tradeways.org" #property indicator_chart_window #property indicator_buffers 8 #property indicator_color1 Blue #property indicator_color2 Red #property indicator_color3 DodgerBlue #property indicator_color4 Tomato #property indicator_color5 Blue #property indicator_color6 Red #property indicator_color7 DodgerBlue #property indicator_color8 Tomato double g_period_76 = 33.0; double g_period_84 = 39.0; double g_period_92 = 38.0; double g_ibuf_100[]; double g_ibuf_104[]; double g_ibuf_108[]; double g_ibuf_112[]; double g_ibuf_116[]; double g_ibuf_120[]; double g_ibuf_124[]; double g_ibuf_128[]; int init() { SetIndexStyle(0, DRAW_HISTOGRAM); SetIndexBuffer(0, g_ibuf_100); SetIndexStyle(1, DRAW_HISTOGRAM); SetIndexBuffer(1, g_ibuf_104); SetIndexStyle(2, DRAW_HISTOGRAM); SetIndexBuffer(2, g_ibuf_108); SetIndexStyle(3, DRAW_HISTOGRAM); SetIndexBuffer(3, g_ibuf_112); SetIndexStyle(4, DRAW_HISTOGRAM); SetIndexBuffer(4, g_ibuf_116); SetIndexStyle(5, DRAW_HISTOGRAM); SetIndexBuffer(5, g_ibuf_120); SetIndexStyle(6, DRAW_HISTOGRAM); SetIndexBuffer(6, g_ibuf_124); SetIndexStyle(7, DRAW_HISTOGRAM); SetIndexBuffer(7, g_ibuf_128); string ls_0 = "#Pallada_Bars Copyright©2008 TradeWays"; IndicatorShortName(ls_0); return (0); } int start() { double l_icci_0; double l_iwpr_8; double l_iforce_16; int li_24; int l_ind_counted_28 = IndicatorCounted(); if (Bars <= 15) return (0); if (l_ind_counted_28 < 1) { for (int li_32 = 1; li_32 <= 15; li_32++) { g_ibuf_100[Bars - li_32] = 0.0; g_ibuf_108[Bars - li_32] = 0.0; g_ibuf_104[Bars - li_32] = 0.0; g_ibuf_112[Bars - li_32] = 0.0; g_ibuf_116[Bars - li_32] = 0.0; g_ibuf_124[Bars - li_32] = 0.0; g_ibuf_120[Bars - li_32] = 0.0; g_ibuf_128[Bars - li_32] = 0.0; } } if (l_ind_counted_28 > 0) li_24 = Bars - l_ind_counted_28; if (l_ind_counted_28 == 0) li_24 = Bars - 15 - 1; for (li_32 = li_24; li_32 >= 0; li_32--) { l_icci_0 = iCCI(NULL, 0, g_period_84, PRICE_TYPICAL, li_32); l_iwpr_8 = iWPR(NULL, 0, g_period_92, li_32); l_iforce_16 = iForce(NULL, 0, g_period_76, MODE_EMA, PRICE_CLOSE, li_32); g_ibuf_100[li_32] = EMPTY_VALUE; g_ibuf_108[li_32] = EMPTY_VALUE; g_ibuf_104[li_32] = EMPTY_VALUE; g_ibuf_112[li_32] = EMPTY_VALUE; g_ibuf_116[li_32] = EMPTY_VALUE; g_ibuf_124[li_32] = EMPTY_VALUE; g_ibuf_120[li_32] = EMPTY_VALUE; g_ibuf_128[li_32] = EMPTY_VALUE; if (l_icci_0 > 0.0 && l_iwpr_8 > -50.0 && l_iforce_16 > 0.0) { g_ibuf_100[li_32] = MathMax(Open[li_32], Close[li_32]); g_ibuf_104[li_32] = MathMin(Open[li_32], Close[li_32]); g_ibuf_116[li_32] = High[li_32]; g_ibuf_120[li_32] = Low[li_32]; } else { if (l_icci_0 > 0.0 && l_iwpr_8 < -50.0) { g_ibuf_108[li_32] = MathMax(Open[li_32], Close[li_32]); g_ibuf_112[li_32] = MathMin(Open[li_32], Close[li_32]); g_ibuf_124[li_32] = High[li_32]; g_ibuf_128[li_32] = Low[li_32]; } else { if (l_icci_0 < 0.0 && l_iwpr_8 < -50.0 && l_iforce_16 < 0.0) { g_ibuf_104[li_32] = MathMax(Open[li_32], Close[li_32]); g_ibuf_100[li_32] = MathMin(Open[li_32], Close[li_32]); g_ibuf_120[li_32] = High[li_32]; g_ibuf_116[li_32] = Low[li_32]; } else { if (l_icci_0 < 0.0 && l_iwpr_8 > -50.0) { g_ibuf_112[li_32] = MathMax(Open[li_32], Close[li_32]); g_ibuf_108[li_32] = MathMin(Open[li_32], Close[li_32]); g_ibuf_128[li_32] = High[li_32]; g_ibuf_124[li_32] = Low[li_32]; } } } } } return (0); }