/* Generated by EX4-TO-MQ4 decompiler V4.0.224.1 [] Website: http://purebeam.biz E-mail : purebeam@gmail.com */ #property copyright "Copyright © 2008, SEFC " #property link "Author : I.Bambang Pitono, SE, MBA" #property indicator_chart_window #property indicator_buffers 4 #property indicator_color1 Blue #property indicator_color2 Red #property indicator_color3 Black #property indicator_color4 Black extern int MaMetod = 3; extern int MaPeriod = 14; double g_ibuf_84[]; double g_ibuf_88[]; double g_ibuf_92[]; double g_ibuf_96[]; int gi_100 = 0; int init() { SetIndexStyle(0, DRAW_ARROW, STYLE_SOLID, 2); SetIndexArrow(0, 217); SetIndexBuffer(0, g_ibuf_84); SetIndexStyle(1, DRAW_ARROW, STYLE_SOLID, 2); SetIndexArrow(1, 218); SetIndexBuffer(1, g_ibuf_88); SetIndexStyle(2, DRAW_NONE, STYLE_SOLID, 0, CLR_NONE); SetIndexBuffer(2, g_ibuf_92); SetIndexStyle(3, DRAW_NONE, STYLE_SOLID, 0, CLR_NONE); SetIndexBuffer(3, g_ibuf_96); SetIndexDrawBegin(0, 5); SetIndexBuffer(0, g_ibuf_84); SetIndexBuffer(1, g_ibuf_88); SetIndexBuffer(2, g_ibuf_92); SetIndexBuffer(3, g_ibuf_96); return (0); } int deinit() { return (0); } int start() { double l_ima_0; double l_ima_8; double l_ima_16; double l_ima_24; double ld_32; double ld_40; double ld_48; double ld_56; if (Bars <= 10) return (0); gi_100 = IndicatorCounted(); if (gi_100 < 0) return (-1); if (gi_100 > 0) gi_100--; for (int li_64 = Bars - gi_100 - 1; li_64 >= 0; li_64--) { l_ima_0 = iMA(NULL, 0, MaPeriod, 0, MaMetod, PRICE_CLOSE, li_64); l_ima_8 = iMA(NULL, 0, MaPeriod, 0, MaMetod, PRICE_LOW, li_64); l_ima_16 = iMA(NULL, 0, MaPeriod, 0, MaMetod, PRICE_OPEN, li_64); l_ima_24 = iMA(NULL, 0, MaPeriod, 0, MaMetod, PRICE_HIGH, li_64); ld_32 = (g_ibuf_92[li_64 + 1] + (g_ibuf_96[li_64 + 1])) / 2.0; ld_56 = (l_ima_0 + l_ima_24 + l_ima_16 + l_ima_8) / 4.0; ld_40 = MathMax(l_ima_24, MathMax(ld_32, ld_56)); ld_48 = MathMin(l_ima_16, MathMin(ld_32, ld_56)); if (ld_32 < ld_56) { g_ibuf_84[li_64] = ld_48; } else { g_ibuf_88[li_64] = ld_40; } g_ibuf_92[li_64] = ld_32; g_ibuf_96[li_64] = ld_56; } return (0); }