Time: 2017-04-01 | Download file:fxid_donchian.mq4
/* Generated by EX4-TO-MQ4 decompiler V4.0.438.4 [-] Website: https://purebeam.biz E-mail : purebeam@gmail.com */ #property copyright "RoboFxId.Com" #property link "http://robofxid.com " #property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 Orange #property indicator_color2 Orange #property indicator_color3 Blue extern int IPeriod = 20; double gda_80[]; double gda_84[]; double gda_88[]; int init() { SetIndexStyle(0, DRAW_LINE, STYLE_DOT, 1); SetIndexBuffer(0, gda_80); SetIndexLabel(0, "DonchiResistance"); SetIndexStyle(1, DRAW_LINE, STYLE_DOT, 1); SetIndexLabel(1, "DonchiSupport"); SetIndexBuffer(1, gda_84); SetIndexStyle(2, DRAW_LINE, STYLE_SOLID, 1); SetIndexBuffer(2, gda_88); SetIndexLabel(2, "DonchiPivot"); return (0); } int deinit() { return (0); } int start() { for (int li_0 = 0; li_0 < Bars; li_0++) { gda_80[li_0] = High[iHighest(Symbol(), 0, MODE_HIGH, IPeriod, li_0 + 1)]; gda_84[li_0] = Low[iLowest(Symbol(), 0, MODE_LOW, IPeriod, li_0 + 1)]; gda_88[li_0] = (gda_80[li_0] + gda_84[li_0]) / 2.0; } return (0); }