#property copyright "tonyc2a@yahoo.com" #property link "" #property indicator_separate_window #property indicator_buffers 2 #property indicator_color1 DarkKhaki #property indicator_color2 Red extern bool Main.Line.Histogram = FALSE; extern int Fast.MA.Period = 5; extern int Slow.MA.Period = 34; extern int Signal.period = 5; double g_ibuf_92[]; double g_ibuf_96[]; int init() { if (Main.Line.Histogram) SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 2); else SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 2); SetIndexBuffer(0, g_ibuf_92); SetIndexLabel(0, "EWO"); SetIndexStyle(1, DRAW_LINE, STYLE_SOLID, 1); SetIndexBuffer(1, g_ibuf_96); SetIndexLabel(1, "Signal"); IndicatorShortName("Elliott Wave Oscillator"); return (0); } int deinit() { return (0); } int start() { double l_ima_4; double l_ima_12; int l_ind_counted_0 = IndicatorCounted(); int li_20 = Bars - l_ind_counted_0; if (l_ind_counted_0 > 0) li_20++; for (int li_24 = 0; li_24 < li_20; li_24++) { l_ima_4 = iMA(NULL, 0, Fast.MA.Period, 0, MODE_SMA, PRICE_MEDIAN, li_24); l_ima_12 = iMA(NULL, 0, Slow.MA.Period, 0, MODE_SMA, PRICE_MEDIAN, li_24); g_ibuf_92[li_24] = l_ima_4 - l_ima_12; } for (li_24 = 0; li_24 < li_20; li_24++) g_ibuf_96[li_24] = iMAOnArray(g_ibuf_92, Bars, Signal.period, 0, MODE_LWMA, li_24); return (0); }