#property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 Blue extern double ATRPeriod = 5.0; extern double ATRPeriod2 = 20.0; extern int ADXPeriod = 12; extern double ADXAlertLevel = 25.0; extern int Trix = 0; extern int TrixMTF = 15; extern int MOM_Period = 4; int g_timeframe_116 = 0; int g_timeframe_120 = PERIOD_M15; string gs_unused_124 = " "; string gs_unused_132 = "Change font colors automatically? True = Yes"; extern bool Change_Colors = TRUE; extern string note2 = "Default Font Color"; extern color FontColor = DodgerBlue; extern color FontUp = Lime; extern color FontDown = Red; extern color BoxColor = DarkSlateGray; int g_color_168 = Black; int gi_unused_172 = Black; int g_color_176 = Black; int g_color_180 = Black; int g_color_184 = Black; int g_color_188 = Black; int g_color_192 = Black; string gs_unused_196 = "Font Size"; int g_fontsize_204 = 16; int g_fontsize_208 = 10; string gs_unused_212 = "Font Type"; string g_fontname_220 = "Comic Sans MS"; extern string note5 = "What corner?"; extern string note6 = "Upper left=0; Upper right=1"; extern string note7 = "Lower left=2; Lower right=3"; extern int WhatCorner = 1; double g_bid_256; string gs_264; string gs_272; string gs_280; string gs_288; int init() { if (TrixMTF == 5) g_timeframe_120 = 5; if (TrixMTF == 15) g_timeframe_120 = 15; if (TrixMTF == 30) g_timeframe_120 = 30; if (TrixMTF == 60) g_timeframe_120 = 60; if (TrixMTF == 240) g_timeframe_120 = 240; if (TrixMTF == 1440) g_timeframe_120 = 1440; if (Trix == 5) g_timeframe_116 = 5; if (Trix == 15) g_timeframe_116 = 15; if (Trix == 30) g_timeframe_116 = 30; if (Trix == 60) g_timeframe_116 = 60; if (Trix == 240) g_timeframe_116 = 240; if (Trix == 0) g_timeframe_116 = Period(); Comment("DXTrade Info"); return (0); } int deinit() { ObjectDelete("Box"); ObjectDelete("Box1"); ObjectDelete("Box2"); ObjectDelete("Market_Price_Label"); ObjectDelete("Trix5m"); ObjectDelete("Trix15m"); ObjectDelete("Pair"); ObjectDelete("Spread"); ObjectDelete("atrpips2"); ObjectDelete("atrpips"); ObjectDelete("Trend"); ObjectDelete("ATRTrend"); ObjectDelete("TrendT5"); ObjectDelete("TrendT15"); ObjectDelete("cci"); ObjectDelete("mom"); return (0); } int start() { int l_shift_4; int li_8; if (Change_Colors == TRUE) { if (Bid > g_bid_256) g_color_184 = FontUp; if (Bid < g_bid_256) g_color_184 = FontDown; g_bid_256 = Bid; } int l_timeframe_0 = 0; if (l_timeframe_0 != Period()) l_shift_4 = iBarShift(NULL, l_timeframe_0, iTime(NULL, 0, li_8)); string l_dbl2str_12 = DoubleToStr(Bid, Digits); string ls_20 = AccountCurrency(); string l_dbl2str_28 = DoubleToStr(NormalizeDouble((Ask - Bid) / Point, 0), 0); double l_iatr_36 = iATR(NULL, 0, ATRPeriod, l_shift_4); double l_iatr_44 = iATR(NULL, 0, ATRPeriod2, l_shift_4); string l_dbl2str_52 = DoubleToStr(NormalizeDouble(l_iatr_36 / Point, 0), l_shift_4); string l_dbl2str_60 = DoubleToStr(NormalizeDouble(l_iatr_44 / Point, 0), l_shift_4); string l_dbl2str_68 = DoubleToStr(ATRPeriod, 0); string l_dbl2str_76 = DoubleToStr(ATRPeriod2, 0); double l_iadx_84 = iADX(NULL, 0, ADXPeriod, PRICE_CLOSE, MODE_MAIN, 0); double l_iadx_92 = iADX(NULL, 0, ADXPeriod, PRICE_CLOSE, MODE_PLUSDI, 0); double l_iadx_100 = iADX(NULL, 0, ADXPeriod, PRICE_CLOSE, MODE_MINUSDI, 0); double l_ima_108 = iMA(NULL, g_timeframe_116, 8, 0, MODE_LWMA, PRICE_WEIGHTED, l_shift_4); double l_ima_116 = iMA(NULL, g_timeframe_116, 8, 0, MODE_LWMA, PRICE_OPEN, l_shift_4); double l_ima_124 = iMA(NULL, g_timeframe_120, 8, 0, MODE_LWMA, PRICE_WEIGHTED, 0); double l_ima_132 = iMA(NULL, g_timeframe_120, 8, 0, MODE_LWMA, PRICE_OPEN, 0); double l_imomentum_140 = iMomentum(NULL, l_timeframe_0, MOM_Period, PRICE_CLOSE, l_shift_4); string l_dbl2str_148 = DoubleToStr(l_imomentum_140, 3); double l_icci_156 = iCCI(NULL, PERIOD_M1, 14, PRICE_TYPICAL, l_shift_4); double l_icci_164 = iCCI(NULL, PERIOD_M1, 50, PRICE_TYPICAL, l_shift_4); double ld_172 = (MathRound(l_icci_156) + MathRound(l_icci_164)) / 2.0; string l_dbl2str_180 = DoubleToStr(ld_172, 2); if (l_iadx_84 > ADXAlertLevel && l_iadx_92 > l_iadx_100 && l_iadx_92 > ADXAlertLevel) gs_264 = "Up"; if (l_iadx_84 > ADXAlertLevel && l_iadx_100 > l_iadx_92 && l_iadx_100 > ADXAlertLevel) gs_264 = "Down"; if (l_iadx_84 < ADXAlertLevel) gs_264 = "Flat"; if (l_iadx_84 > ADXAlertLevel && l_iadx_92 > l_iadx_100) g_color_180 = FontUp; if (l_iadx_84 > ADXAlertLevel && l_iadx_100 > l_iadx_92) g_color_180 = FontDown; if (l_iadx_84 < ADXAlertLevel) g_color_180 = FontColor; if (l_iatr_36 > l_iatr_44) gs_272 = "High"; if (l_iatr_36 < l_iatr_44) gs_272 = "Low"; if (l_iatr_36 == l_iatr_44) gs_264 = "Flat"; if (l_iatr_36 > l_iatr_44) g_color_188 = FontUp; if (l_iatr_36 < l_iatr_44) g_color_188 = FontDown; if (l_iatr_36 == l_iatr_44) g_color_188 = FontColor; if (l_ima_108 > l_ima_116) g_color_168 = FontUp; if (l_ima_108 < l_ima_116) g_color_168 = FontDown; if (l_ima_108 > l_ima_116) gs_280 = "Up"; if (l_ima_108 < l_ima_116) gs_280 = "Down"; if (l_ima_124 > l_ima_132) g_color_176 = FontUp; if (l_ima_124 < l_ima_132) g_color_176 = FontDown; if (l_ima_124 > l_ima_132) gs_288 = "Up"; if (l_ima_124 < l_ima_132) gs_288 = "Down"; if (ld_172 > 0.0) gi_unused_172 = FontUp; if (ld_172 < 0.0) gi_unused_172 = FontDown; if (l_imomentum_140 > 100.0) g_color_192 = FontUp; if (l_imomentum_140 < 100.0) g_color_192 = FontDown; ObjectCreate("Box", OBJ_LABEL, 0, 0, 0, 0, 0); ObjectSetText("Box", "g", 80, "Webdings", BoxColor); ObjectSet("Box", OBJPROP_CORNER, WhatCorner); ObjectSet("Box", OBJPROP_XDISTANCE, 5); ObjectSet("Box", OBJPROP_YDISTANCE, 10); ObjectSet("Box", OBJPROP_COLOR, BoxColor); ObjectSet("Box", OBJPROP_BACK, TRUE); ObjectCreate("Box1", OBJ_LABEL, 0, 0, 0, 0, 0); ObjectSetText("Box1", "g", 80, "Webdings", BoxColor); ObjectSet("Box1", OBJPROP_CORNER, WhatCorner); ObjectSet("Box1", OBJPROP_XDISTANCE, 5); ObjectSet("Box1", OBJPROP_YDISTANCE, 110); ObjectSet("Box1", OBJPROP_COLOR, BoxColor); ObjectSet("Box1", OBJPROP_BACK, TRUE); ObjectCreate("Box2", OBJ_LABEL, 0, 0, 0, 0, 0); ObjectSetText("Box2", "g", 80, "Webdings", BoxColor); ObjectSet("Box2", OBJPROP_CORNER, WhatCorner); ObjectSet("Box2", OBJPROP_XDISTANCE, 5); ObjectSet("Box2", OBJPROP_YDISTANCE, 160); ObjectSet("Box2", OBJPROP_COLOR, BoxColor); ObjectSet("Box2", OBJPROP_BACK, TRUE); ObjectCreate("Pair", OBJ_LABEL, 0, 0, 0); ObjectSet("Pair", OBJPROP_XDISTANCE, 18); ObjectSet("Pair", OBJPROP_YDISTANCE, 20); ObjectSetText("Pair", Symbol(), 14, g_fontname_220, FontColor); ObjectSet("Pair", OBJPROP_CORNER, WhatCorner); ObjectSet("Pair", OBJPROP_BACK, FALSE); ObjectCreate("Market_Price_Label", OBJ_LABEL, 0, 0, 0); ObjectSetText("Market_Price_Label", l_dbl2str_12, g_fontsize_204, g_fontname_220, g_color_184); ObjectSet("Market_Price_Label", OBJPROP_CORNER, WhatCorner); ObjectSet("Market_Price_Label", OBJPROP_XDISTANCE, 22); ObjectSet("Market_Price_Label", OBJPROP_YDISTANCE, 40); ObjectSet("Market_Price_Label", OBJPROP_BACK, FALSE); ObjectCreate("Spread", OBJ_LABEL, 0, 0, 0); ObjectSetText("Spread", "Spread: " + l_dbl2str_28, g_fontsize_208, "Arial", FontColor); ObjectSet("Spread", OBJPROP_CORNER, WhatCorner); ObjectSet("Spread", OBJPROP_XDISTANCE, 23); ObjectSet("Spread", OBJPROP_YDISTANCE, 65); ObjectSet("Spread", OBJPROP_BACK, FALSE); ObjectCreate("atrpips", OBJ_LABEL, 0, 0, 0); ObjectSetText("atrpips", "ATR(" + l_dbl2str_68 + "): " + l_dbl2str_52, g_fontsize_208, "Arial", FontColor); ObjectSet("atrpips", OBJPROP_CORNER, WhatCorner); ObjectSet("atrpips", OBJPROP_XDISTANCE, 22); ObjectSet("atrpips", OBJPROP_YDISTANCE, 90); ObjectSet("atrpips", OBJPROP_BACK, FALSE); ObjectCreate("atrpips2", OBJ_LABEL, 0, 0, 0); ObjectSetText("atrpips2", "ATR(" + l_dbl2str_76 + "): " + l_dbl2str_60, g_fontsize_208, "Arial", FontColor); ObjectSet("atrpips2", OBJPROP_CORNER, WhatCorner); ObjectSet("atrpips2", OBJPROP_XDISTANCE, 20); ObjectSet("atrpips2", OBJPROP_YDISTANCE, 110); ObjectSet("atrpips2", OBJPROP_BACK, FALSE); ObjectCreate("ATRTrend", OBJ_LABEL, 0, 0, 0); ObjectSetText("ATRTrend", "ATR: " + gs_272, g_fontsize_208, "Arial", g_color_188); ObjectSet("ATRTrend", OBJPROP_CORNER, WhatCorner); ObjectSet("ATRTrend", OBJPROP_XDISTANCE, 24); ObjectSet("ATRTrend", OBJPROP_YDISTANCE, 140); ObjectSet("ATRTrend", OBJPROP_BACK, FALSE); ObjectCreate("Trend", OBJ_LABEL, 0, 0, 0); ObjectSetText("Trend", "ADX: " + gs_264, g_fontsize_208, "Arial", g_color_180); ObjectSet("Trend", OBJPROP_CORNER, WhatCorner); ObjectSet("Trend", OBJPROP_XDISTANCE, 24); ObjectSet("Trend", OBJPROP_YDISTANCE, 160); ObjectSet("Trend", OBJPROP_BACK, FALSE); ObjectCreate("Trix5m", OBJ_LABEL, 0, 0, 0); ObjectSetText("Trix5m", "Trix(M" + g_timeframe_116 + "): " + gs_280, g_fontsize_208, "Arial", g_color_168); ObjectSet("Trix5m", OBJPROP_CORNER, WhatCorner); ObjectSet("Trix5m", OBJPROP_XDISTANCE, 10); ObjectSet("Trix5m", OBJPROP_YDISTANCE, 180); ObjectSet("Trix5m", OBJPROP_BACK, FALSE); ObjectCreate("Trix15m", OBJ_LABEL, 0, 0, 0); ObjectSetText("Trix15m", "Trix(M" + g_timeframe_120 + "): " + gs_288, g_fontsize_208, "Arial", g_color_176); ObjectSet("Trix15m", OBJPROP_CORNER, WhatCorner); ObjectSet("Trix15m", OBJPROP_XDISTANCE, 10); ObjectSet("Trix15m", OBJPROP_YDISTANCE, 200); ObjectSet("Trix15m", OBJPROP_BACK, FALSE); ObjectCreate("mom", OBJ_LABEL, 0, 0, 0); ObjectSetText("mom", "Mom(" + MOM_Period + "): " + l_dbl2str_148, g_fontsize_208, "Arial", g_color_192); ObjectSet("mom", OBJPROP_CORNER, WhatCorner); ObjectSet("mom", OBJPROP_XDISTANCE, 10); ObjectSet("mom", OBJPROP_YDISTANCE, 220); ObjectSet("mom", OBJPROP_BACK, FALSE); return (0); }