/* Generated by EX4-TO-MQ4 decompiler V4.0.224.1 [] Website: http://purebeam.biz E-mail : purebeam@gmail.com */ #property copyright "Copyright © 2009, Learn Forex Live" #property link "http://www.LearnForexLive.com" #property indicator_chart_window extern int P = 10; double gd_unused_80 = 70.0; double gd_unused_88 = 50.0; extern color Level1 = Gold; extern color Level2 = DarkGray; int Pct = .50; int gi_104 = 13882323; int gi_108 = 0; int g_width_112 = 1; int init() { return (0); } int deinit() { DrawLevel("High1", 0, gi_108, Level1); DrawLevel("Low1", 0, gi_108, Level1); DrawLevel("High2", 0, gi_108, Level2); DrawLevel("Low2", 0, gi_108, Level2); DrawLevel("High3", 0, gi_108, gi_104); DrawLevel("Low3", 0, gi_108, gi_104); return (0); } int start() { double lda_68[2][6]; int l_ind_counted_0 = IndicatorCounted(); double l_iatr_4 = iATR(NULL, PERIOD_W1, P, 0); double l_iatr_12 = iATR(NULL, PERIOD_W1, 7, 0); double ld_20 = Ask - Bid; double ld_28 = 0; double ld_36 = 0; double ld_unused_44 = Close[0]; double ld_52 = 0; double ld_60 = 0; double ld_72 = 0; double ld_80 = 0; double l_tickvalue_88 = MarketInfo(Symbol(), MODE_TICKVALUE); double ld_96 = iLow(NULL, PERIOD_W1, 0) + l_iatr_12; double ld_104 = iHigh(NULL, PERIOD_W1, 0) - l_iatr_12; if (l_iatr_12 < 0.1) ld_28 = 10000.0 * l_iatr_12; else ld_28 = 100.0 * l_iatr_12; if (ld_20 < 0.1) ld_36 = 10000.0 * ld_20; else ld_36 = 100.0 * ld_20; if (ld_36 > 99.0) ld_36 /= 100.0; else ld_36 = ld_36; ArrayCopyRates(lda_68, Symbol(), PERIOD_W1); ld_72 = lda_68[0][3]; ld_80 = lda_68[0][2]; ld_60 = ld_72 - ld_80; if (ld_60 < 0.1) ld_52 = 10000.0 * ld_60; else ld_52 = 100.0 * ld_60; if (iLow(NULL, PERIOD_W1, 0) < 10.0) Comment(" ", ld_52, " / ", NormalizeDouble(ld_28, 0), " / ", NormalizeDouble(ld_96, 4), " / ", NormalizeDouble(ld_104, 4)); else Comment(" ", ld_52, " / ", NormalizeDouble(ld_28, 0), " / ", NormalizeDouble(ld_96, 2), " / ", NormalizeDouble(ld_104, 2)); double ld_112 = l_iatr_4 / 2.0; double ld_120 = ld_96; ld_120 = NormalizeDouble(ld_120, Digits); double ld_128 = (Pct * (ld_96 - iLow(NULL, PERIOD_W1, 0))) + iLow(NULL, PERIOD_W1, 0); ld_128 = NormalizeDouble(ld_128, Digits); double ld_136 = ld_104; ld_136 = NormalizeDouble(ld_136, Digits); double ld_144 = iHigh(NULL, PERIOD_W1, 0) -( Pct * (ld_96 - iLow(NULL, PERIOD_W1, 0))); ld_144 = NormalizeDouble(ld_144, Digits); DrawLevel("high1", ld_120, gi_108, Level1); DrawLevel("high2", ld_128, gi_108, Level2); DrawLevel("low1", ld_136, gi_108, Level1); DrawLevel("low2", ld_144, gi_108, Level2); return (0); } void DrawLevel(string a_name_0, double ad_8, int a_style_16, color a_color_20) { double l_price_24 = ad_8; double l_price_32 = ad_8; int l_time_40 = Time[iBarShift(NULL, 0, StrToTime(Year() + "." + Month() + "." + Day() + " " + 0 + ":" + 0))]; int l_datetime_44 = Time[0]; if (ad_8 > 0.0) { if (ObjectFind(a_name_0) != 0) { ObjectCreate(a_name_0, OBJ_TREND, 0, l_time_40, l_price_24, l_datetime_44, l_price_32); ObjectSet(a_name_0, OBJPROP_RAY, FALSE); ObjectSet(a_name_0, OBJPROP_COLOR, a_color_20); ObjectSet(a_name_0, OBJPROP_WIDTH, g_width_112); ObjectSet(a_name_0, OBJPROP_STYLE, a_style_16); return; } ObjectSet(a_name_0, OBJPROP_RAY, FALSE); ObjectMove(a_name_0, 0, l_time_40, l_price_24); ObjectMove(a_name_0, 1, l_datetime_44, l_price_32); ObjectSet(a_name_0, OBJPROP_COLOR, a_color_20); ObjectSet(a_name_0, OBJPROP_WIDTH, g_width_112); ObjectSet(a_name_0, OBJPROP_STYLE, a_style_16); return; } if (ObjectFind(a_name_0) >= 0) ObjectDelete(a_name_0); }