#property copyright "Copyright © 2009, DTS, LLC" #property link "http://www.fxprofitmountain.net" #property indicator_separate_window #property indicator_minimum -1.2 #property indicator_maximum 1.2 #property indicator_buffers 2 #property indicator_color1 Green #property indicator_color2 IndianRed extern int a = 5; extern int b = 3; extern int c = 3; double g_ibuf_88[]; double g_ibuf_92[]; double gda_unused_96[]; int init() { SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 2, Green); SetIndexBuffer(0, g_ibuf_88); SetIndexEmptyValue(0, 0); SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 2, IndianRed); SetIndexBuffer(1, g_ibuf_92); SetIndexEmptyValue(1, 0); return (0); } int deinit() { return (0); } int start() { double l_istochastic_12; int li_0 = IndicatorCounted(); if (li_0 < 0) return (-1); if (li_0 > 0) li_0--; int li_8 = Bars - 31; if (li_0 >= 31) li_8 = Bars - li_0 - 1; for (int l_shift_4 = li_8; l_shift_4 >= 0; l_shift_4--) { l_istochastic_12 = iStochastic(NULL, 0, a, b, c, MODE_SMA, 0, MODE_MAIN, l_shift_4); g_ibuf_88[l_shift_4] = 0; g_ibuf_92[l_shift_4] = 0; if (l_istochastic_12 >= 50.0) g_ibuf_88[l_shift_4] = 1; else g_ibuf_92[l_shift_4] = -1; } return (0); }