/* Generated by EX4-TO-MQ4 decompiler V4.0.438.3 [-] Website: https://purebeam.biz E-mail : purebeam@gmail.com */ #property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 Blue #property indicator_color2 White #property indicator_color3 Red double g_ibuf_76[]; double g_ibuf_80[]; double g_ibuf_84[]; int g_period_88 = 20; int init() { SetIndexStyle(0, DRAW_LINE); SetIndexShift(0, 0); SetIndexDrawBegin(0, 0); SetIndexBuffer(0, g_ibuf_76); SetIndexStyle(1, DRAW_NONE); SetIndexShift(1, 0); SetIndexDrawBegin(1, 0); SetIndexBuffer(1, g_ibuf_80); SetIndexStyle(2, DRAW_LINE); SetIndexShift(2, 0); SetIndexDrawBegin(2, 0); SetIndexBuffer(2, g_ibuf_84); return (0); } int deinit() { return (0); } int start() { double ld_8; if (ObjectType("TRX") != 23) ObjectDelete("TRX"); if (ObjectFind("TRX") == -1) ObjectCreate("TRX", OBJ_LABEL, 0, Time[5], Close[5]); ObjectSetText("TRX", "Launcher TRX Indicator (R)"); ObjectSet("TRX", OBJPROP_CORNER, 4); ObjectSet("TRX", OBJPROP_FONTSIZE, 12); ObjectSet("TRX", OBJPROP_XDISTANCE, 5); ObjectSet("TRX", OBJPROP_YDISTANCE, 20); int li_4 = IndicatorCounted(); if (li_4 < 0) return (-1); if (li_4 > 0) li_4--; int li_0 = Bars - li_4; for (int li_16 = 0; li_16 < li_0; li_16++) { g_ibuf_80[li_16] = iMA(NULL, 0, g_period_88, 0, MODE_SMA, PRICE_TYPICAL, li_16); ld_8 = findAvg(g_period_88, li_16); g_ibuf_76[li_16] = g_ibuf_80[li_16] + 1.5 * ld_8; g_ibuf_84[li_16] = g_ibuf_80[li_16] - 1.5 * ld_8; } double iatr_20 = iATR(Symbol(), 0, 50, 1); return (0); } double findAvg(int ai_0, int ai_4) { double ld_ret_8 = 0; for (int li_16 = ai_4; li_16 < ai_4 + ai_0; li_16++) ld_ret_8 += High[li_16] - Low[li_16]; ld_ret_8 /= ai_0; return (ld_ret_8); }