标签:
杂谈 |
查看原文:http://www.125808047.com/?p=2106
#Signal_Bars_v8
指标在图表中简洁的显示日内当前波动幅度和实时点差,同时也在循环计算各周期MACD、STR、EMA的变化情况。
#Signal_Bars_v8 指标图表效果如下:http://www.125808047.com/fgp/wp-content/uploads/2016/03/2016032201-300x88.jpg#Signal_Bars_v8" />
#Signal_Bars_v8 指标源码如下:
//+------------------------------------------------------------------+ //| #Signal_Bars_v8.mq4 | //| Copyright 2016, QQ:125808047 | //+------------------------------------------------------------------+ #property copyright "www.125808047.com" #property link "http://www.125808047.com/" #property indicator_chart_window extern string Note1 = "Signal_Bars_v8 now has User"; extern string Note2 = "selectable TimeFrames and the Price"; extern string Note3 = "color updates as Price moves"; extern string IIIIIIIIIIIIIIII = "IIIIIIIIIIIIIIIIIIIIIIIIIIIIIII"; extern string PassWord = "free_at_tsd"; extern string IIIIIIIIIIIIIIIII = "<<<< Adjustable TimeFrames >>>>>>>>>>>>>>>>>>>>>>>>"; extern int TF1 = 1; extern int TF2 = 5; extern int TF3 = 15; extern int TF4 = 30; extern int TF5 = 60; extern int TF6 = 240; extern int TF7 = 1440; extern string IIIIIIIIIIIIIIIIII = "<<<< Chart Position Settings >>>>>"; extern bool Corner_of_Chart_RIGHT_TOP = TRUE; extern int Shift_UP_DN = 0; extern int Adjust_Side_to_side = 10; extern int Sig_Bars_Window = 0; extern string IIIIIIIIIIIIIIIIIII = " <<<< Comments Settings >>>>>>>>"; extern bool Show_Price = TRUE; extern bool Show_Xtra_Details = TRUE; extern bool Show_Smaller_Size = FALSE; extern color TimeFrame_Label_color = Silver; extern color BarLabel_color = Silver; extern color CommentLabel_color = Silver; extern color Spread_color = DarkOrange; extern color HI_LO_color = DarkOrange; extern color Pips_UP = Lime; extern color Pips_DN = OrangeRed; extern color Daily_AV_UP = Lime; extern color Daily_AV_DN = OrangeRed; extern string IIIIIIIIIIIIIIIIIIII = " <<<< Price Color Settings >>>>>>>>"; extern color Price_UP = Lime; extern color Price_DN = Red; extern color Price_Neutral = Orange; extern string IIIIIIIIIIIIIIIIIIIII = "<<<< MACD Settings >>>>>>>>>>>"; extern int MACD_Fast = 8; extern int MACD_Slow = 17; extern int MACD_Signal = 9; extern int MACD_PRICE_TYPE = 0; extern string IIIIIIIIIIIIIIIIIIIIIII = "<<<< MACD Colors >>>>>>>>>>>>>>>>>>"; extern color XUP_above_0 = Lime; extern color XDN_above_0 = Tomato; extern color XUP_below_0 = Green; extern color XDN_below_0 = Red; extern string IIIIIIIIIIIIIIIIIIIIIIII = "<<<< STR Indicator Settings >>>>>>>>>>>>>"; extern string IIIIIIIIIIIIIIIIIIIIIIII I = "<<<< RSI Settings >>>>>>>>>>>>>"; extern int RSI_Period = 9; extern int RSI_PRICE_TYPE = 0; extern string IIIIIIIIIIIIIIIIIIIIIIII II = "<<<< CCI Settings >>>>>>>>>>>>>>"; extern int CCI_Period = 13; extern int CCI_PRICE_TYPE = 0; extern string IIIIIIIIIIIIIIIIIIIIIIII III = "<<<< STOCH Settings >>>>>>>>>>>"; extern int STOCH_K_Period = 5; extern int STOCH_D_Period = 3; extern int STOCH_Slowing = 3; extern int STOCH_MA_MODE = 1; extern string IIIIIIIIIIIIIIIIIIIIIIII IIII = "<<<< STR Colors >>>>>>>>>>>>>>>>"; extern color STR_UP = Lime; extern color STR_DN = Red; extern color STR_NO_Signal = Orange; extern string IIIIIIIIIIIIIIIIIIIIIIII IIIII = "<<<< MA Settings >>>>>>>>>>>>>>"; extern int MA_Fast = 5; extern int MA_Slow = 9; extern int MA_MODE = 1; extern int MA_PRICE_TYPE = 0; extern string IIIIIIIIIIIIIIIIIIIIIIII IIIIII = "<<<< MA Colors >>>>>>>>>>>>>>"; extern color MA_UP = Lime; extern color MA_DN = Red; int Signal(string a_name_0, int a_x_8, int a_y_12) { ObjectCreate(a_name_0, OBJ_LABEL, Sig_Bars_Window, 0, 0); ObjectSet(a_name_0, OBJPROP_CORNER, Corner_of_Chart_RIGHT_TOP); ObjectSet(a_name_0, OBJPROP_XDISTANCE, a_x_8); ObjectSet(a_name_0, OBJPROP_YDISTANCE, a_y_12); ObjectSet(a_name_0, OBJPROP_BACK, FALSE); return (0); } int init() { return (0); } int deinit() { ObjectDelete("cja"); ObjectDelete("Signalprice"); ObjectDelete("tsd_FREE"); ObjectDelete("SIG_BARS_TF1"); ObjectDelete("SIG_BARS_TF2"); ObjectDelete("SIG_BARS_TF3"); ObjectDelete("SIG_BARS_TF4"); ObjectDelete("SIG_BARS_TF5"); ObjectDelete("SIG_BARS_TF6"); ObjectDelete("SIG_BARS_TF7"); ObjectDelete("SSignalMACD_TEXT"); ObjectDelete("SSignalMACDM1"); ObjectDelete("SSignalMACDM5"); ObjectDelete("SSignalMACDM15"); ObjectDelete("SSignalMACDM30"); ObjectDelete("SSignalMACDH1"); ObjectDelete("SSignalMACDH4"); ObjectDelete("SSignalMACDD1"); ObjectDelete("SSignalSTR_TEXT"); ObjectDelete("SignalSTRM1"); ObjectDelete("SignalSTRM5"); ObjectDelete("SignalSTRM15"); ObjectDelete("SignalSTRM30"); ObjectDelete("SignalSTRH1"); ObjectDelete("SignalSTRH4"); ObjectDelete("SignalSTRD1"); ObjectDelete("SignalEMA_TEXT"); ObjectDelete("SignalEMAM1"); ObjectDelete("SignalEMAM5"); ObjectDelete("SignalEMAM15"); ObjectDelete("SignalEMAM30"); ObjectDelete("SignalEMAH1"); ObjectDelete("SignalEMAH4"); ObjectDelete("SignalEMAD1"); ObjectDelete("SIG_DETAIL_1"); ObjectDelete("SIG_DETAIL_2"); ObjectDelete("SIG_DETAIL_3"); ObjectDelete("SIG_DETAIL_4"); ObjectDelete("SIG_DETAIL_5"); ObjectDelete("SIG_DETAIL_6"); ObjectDelete("SIG_DETAIL_7"); ObjectDelete("SIG_DETAIL_8"); ObjectDelete("SB71_Password"); ObjectDelete("SB71_Password1"); return (0); } int start() { int li_76; int li_80; int li_84; int li_88; int li_92; int li_96; int li_100; color color_176; color color_180; color color_184; color color_188; color color_192; color color_196; color color_200; string ls_unused_788; color color_796; color color_800; color color_804; color color_808; color color_812; color color_816; color color_820; color color_856; string ls_unused_932; color color_964; color color_968; string text_0 = ""; string text_8 = ""; if (PassWord != "free_at_tsd") { text_0 = "Incorrect Password"; text_8 = "Signal Bars v8 is free @ www.forex-tsd.com"; ObjectDelete("SB71_Password"); ObjectCreate("SB71_Password", OBJ_LABEL, 0, 0, 0); ObjectSetText("SB71_Password", text_0, 60, "Arial", Red); ObjectSet("SB71_Password", OBJPROP_CORNER, 0); ObjectSet("SB71_Password", OBJPROP_XDISTANCE, 240); ObjectSet("SB71_Password", OBJPROP_YDISTANCE, 220); ObjectDelete("SB71_Password1"); ObjectCreate("SB71_Password1", OBJ_LABEL, 0, 0, 0); ObjectSetText("SB71_Password1", text_8, 30, "Arial", Red); ObjectSet("SB71_Password1", OBJPROP_CORNER, 0); ObjectSet("SB71_Password1", OBJPROP_XDISTANCE, 200); ObjectSet("SB71_Password1", OBJPROP_YDISTANCE, 300); return (0); } text_0 = ""; text_8 = ""; int ind_counted_16 = IndicatorCounted(); string text_20 = ""; string text_28 = ""; string text_36 = ""; string text_44 = ""; string text_52 = ""; string text_60 = ""; string text_68 = ""; if (TF1 == PERIOD_M1) text_20 = "M1"; if (TF1 == PERIOD_M5) text_20 = "M5"; if (TF1 == PERIOD_M15) text_20 = "M15"; if (TF1 == PERIOD_M30) text_20 = "M30"; if (TF1 == PERIOD_H1) text_20 = "H1"; if (TF1 == PERIOD_H4) text_20 = "H4"; if (TF1 == PERIOD_D1) text_20 = "D1"; if (TF1 == PERIOD_W1) text_20 = "W1"; if (TF1 == PERIOD_MN1) text_20 = "MN"; if (TF2 == PERIOD_M1) text_28 = "M1"; if (TF2 == PERIOD_M5) text_28 = "M5"; if (TF2 == PERIOD_M15) text_28 = "M15"; if (TF2 == PERIOD_M30) text_28 = "M30"; if (TF2 == PERIOD_H1) text_28 = "H1"; if (TF2 == PERIOD_H4) text_28 = "H4"; if (TF2 == PERIOD_D1) text_28 = "D1"; if (TF2 == PERIOD_W1) text_28 = "W1"; if (TF2 == PERIOD_MN1) text_28 = "MN"; if (TF3 == PERIOD_M1) text_36 = "M1"; if (TF3 == PERIOD_M5) text_36 = "M5"; if (TF3 == PERIOD_M15) text_36 = "M15"; if (TF3 == PERIOD_M30) text_36 = "M30"; if (TF3 == PERIOD_H1) text_36 = "H1"; if (TF3 == PERIOD_H4) text_36 = "H4"; if (TF3 == PERIOD_D1) text_36 = "D1"; if (TF3 == PERIOD_W1) text_36 = "W1"; if (TF3 == PERIOD_MN1) text_36 = "MN"; if (TF4 == PERIOD_M1) text_44 = "M1"; if (TF4 == PERIOD_M5) text_44 = "M5"; if (TF4 == PERIOD_M15) text_44 = "M15"; if (TF4 == PERIOD_M30) text_44 = "M30"; if (TF4 == PERIOD_H1) text_44 = "H1"; if (TF4 == PERIOD_H4) text_44 = "H4"; if (TF4 == PERIOD_D1) text_44 = "D1"; if (TF4 == PERIOD_W1) text_44 = "W1"; if (TF4 == PERIOD_MN1) text_44 = "MN"; if (TF5 == PERIOD_M1) text_52 = "M1"; if (TF5 == PERIOD_M5) text_52 = "M5"; if (TF5 == PERIOD_M15) text_52 = "M15"; if (TF5 == PERIOD_M30) text_52 = "M30"; if (TF5 == PERIOD_H1) text_52 = "H1"; if (TF5 == PERIOD_H4) text_52 = "H4"; if (TF5 == PERIOD_D1) text_52 = "D1"; if (TF5 == PERIOD_W1) text_52 = "W1"; if (TF5 == PERIOD_MN1) text_52 = "MN"; if (TF6 == PERIOD_M1) text_60 = "M1"; if (TF6 == PERIOD_M5) text_60 = "M5"; if (TF6 == PERIOD_M15) text_60 = "M15"; if (TF6 == PERIOD_M30) text_60 = "M30"; if (TF6 == PERIOD_H1) text_60 = "H1"; if (TF6 == PERIOD_H4) text_60 = "H4"; if (TF6 == PERIOD_D1) text_60 = "D1"; if (TF6 == PERIOD_W1) text_60 = "W1"; if (TF6 == PERIOD_MN1) text_60 = "MN"; if (TF7 == PERIOD_M1) text_68 = "M1"; if (TF7 == PERIOD_M5) text_68 = "M5"; if (TF7 == PERIOD_M15) text_68 = "M15"; if (TF7 == PERIOD_M30) text_68 = "M30"; if (TF7 == PERIOD_H1) text_68 = "H1"; if (TF7 == PERIOD_H4) text_68 = "H4"; if (TF7 == PERIOD_D1) text_68 = "D1"; if (TF7 == PERIOD_W1) text_68 = "W1"; if (TF7 == PERIOD_MN1) text_68 = "MN"; if (TF1 == PERIOD_M15) li_76 = -2; if (TF1 == PERIOD_M30) li_76 = -3; if (TF2 == PERIOD_M15) li_80 = -2; if (TF2 == PERIOD_M30) li_80 = -3; if (TF3 == PERIOD_M15) li_84 = -2; if (TF3 == PERIOD_M30) li_84 = -3; if (TF4 == PERIOD_M15) li_88 = -2; if (TF4 == PERIOD_M30) li_88 = -3; if (TF5 == PERIOD_M15) li_92 = -2; if (TF5 == PERIOD_M30) li_92 = -3; if (TF6 == PERIOD_M15) li_96 = -2; if (TF6 == PERIOD_M30) li_96 = -3; if (TF7 == PERIOD_M15) li_100 = -2; if (TF6 == PERIOD_M30) li_100 = -3; if (Shift_UP_DN < 0) return (0); Signal("SIG_BARS_TF1", Adjust_Side_to_side + 134 + li_76, Shift_UP_DN + 23); ObjectSetText("SIG_BARS_TF1", text_20, 7, "Arial Bold", TimeFrame_Label_color); Signal("SIG_BARS_TF2", Adjust_Side_to_side + 114 + li_80, Shift_UP_DN + 23); ObjectSetText("SIG_BARS_TF2", text_28, 7, "Arial Bold", TimeFrame_Label_color); Signal("SIG_BARS_TF3", Adjust_Side_to_side + 94 + li_84, Shift_UP_DN + 23); ObjectSetText("SIG_BARS_TF3", text_36, 7, "Arial Bold", TimeFrame_Label_color); Signal("SIG_BARS_TF4", Adjust_Side_to_side + 74 + li_88, Shift_UP_DN + 23); ObjectSetText("SIG_BARS_TF4", text_44, 7, "Arial Bold", TimeFrame_Label_color); Signal("SIG_BARS_TF5", Adjust_Side_to_side + 54 + li_92, Shift_UP_DN + 23); ObjectSetText("SIG_BARS_TF5", text_52, 7, "Arial Bold", TimeFrame_Label_color); Signal("SIG_BARS_TF6", Adjust_Side_to_side + 34 + li_96, Shift_UP_DN + 23); ObjectSetText("SIG_BARS_TF6", text_60, 7, "Arial Bold", TimeFrame_Label_color); Signal("SIG_BARS_TF7", Adjust_Side_to_side + 14 + li_100, Shift_UP_DN + 23); ObjectSetText("SIG_BARS_TF7", text_68, 7, "Arial Bold", TimeFrame_Label_color); string text_104 = ""; string text_112 = ""; string text_120 = ""; string text_128 = ""; string text_136 = ""; string text_144 = ""; string text_152 = ""; string ls_unused_160 = ""; string ls_unused_168 = ""; double imacd_212 = iMACD(NULL, TF1, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_MAIN, 0); double imacd_220 = iMACD(NULL, TF1, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_SIGNAL, 0); double imacd_228 = iMACD(NULL, TF2, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_MAIN, 0); double imacd_236 = iMACD(NULL, TF2, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_SIGNAL, 0); double imacd_244 = iMACD(NULL, TF3, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_MAIN, 0); double imacd_252 = iMACD(NULL, TF3, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_SIGNAL, 0); double imacd_260 = iMACD(NULL, TF4, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_MAIN, 0); double imacd_268 = iMACD(NULL, TF4, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_SIGNAL, 0); double imacd_276 = iMACD(NULL, TF5, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_MAIN, 0); double imacd_284 = iMACD(NULL, TF5, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_SIGNAL, 0); double imacd_292 = iMACD(NULL, TF6, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_MAIN, 0); double imacd_300 = iMACD(NULL, TF6, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_SIGNAL, 0); double imacd_308 = iMACD(NULL, TF7, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_MAIN, 0); double imacd_316 = iMACD(NULL, TF7, MACD_Fast, MACD_Slow, MACD_Signal, MACD_PRICE_TYPE, MODE_SIGNAL, 0); if (imacd_212 > imacd_220) { text_128 = "ggg"; color_188 = XUP_below_0; } if (imacd_212 <= imacd_220) { text_128 = "ggg"; color_188 = XDN_above_0; } if (imacd_212 > imacd_220 && imacd_212 > 0.0) { text_128 = "ggg"; color_188 = XUP_above_0; } if (imacd_212 <= imacd_220 && imacd_212 < 0.0) { text_128 = "ggg"; color_188 = XDN_below_0; } if (imacd_228 > imacd_236) { text_136 = "ggg"; color_192 = XUP_below_0; } if (imacd_228 <= imacd_236) { text_136 = "ggg"; color_192 = XDN_above_0; } if (imacd_228 > imacd_236 && imacd_228 > 0.0) { text_136 = "ggg"; color_192 = XUP_above_0; } if (imacd_228 <= imacd_236 && imacd_228 < 0.0) { text_136 = "ggg"; color_192 = XDN_below_0; } if (imacd_244 > imacd_252) { text_144 = "ggg"; color_196 = XUP_below_0; } if (imacd_244 <= imacd_252) { text_144 = "ggg"; color_196 = XDN_above_0; } if (imacd_244 > imacd_252 && imacd_244 > 0.0) { text_144 = "ggg"; color_196 = XUP_above_0; } if (imacd_244 <= imacd_252 && imacd_244 < 0.0) { text_144 = "ggg"; color_196 = XDN_below_0; } if (imacd_260 > imacd_268) { text_152 = "ggg"; color_200 = XUP_below_0; } if (imacd_260 <= imacd_268) { text_152 = "ggg"; color_200 = XDN_above_0; } if (imacd_260 > imacd_268 && imacd_260 > 0.0) { text_152 = "ggg"; color_200 = XUP_above_0; } if (imacd_260 <= imacd_268 && imacd_260 < 0.0) { text_152 = "ggg"; color_200 = XDN_below_0; } if (imacd_276 > imacd_284) { text_112 = "ggg"; color_180 = XUP_below_0; } if (imacd_276 <= imacd_284) { text_112 = "ggg"; color_180 = XDN_above_0; } if (imacd_276 > imacd_284 && imacd_276 > 0.0) { text_112 = "ggg"; color_180 = XUP_above_0; } if (imacd_276 <= imacd_284 && imacd_276 < 0.0) { text_112 = "ggg"; color_180 = XDN_below_0; } if (imacd_292 > imacd_300) { text_120 = "ggg"; color_184 = XUP_below_0; } if (imacd_292 <= imacd_300) { text_120 = "ggg"; color_184 = XDN_above_0; } if (imacd_292 > imacd_300 && imacd_292 > 0.0) { text_120 = "ggg"; color_184 = XUP_above_0; } if (imacd_292 <= imacd_300 && imacd_292 < 0.0) { text_120 = "ggg"; color_184 = XDN_below_0; } if (imacd_308 > imacd_316) { text_104 = "ggg"; color_176 = XUP_below_0; } if (imacd_308 <= imacd_316) { text_104 = "ggg"; color_176 = XDN_above_0; } if (imacd_308 > imacd_316 && imacd_308 > 0.0) { text_104 = "ggg"; color_176 = XUP_above_0; } if (imacd_308 <= imacd_316 && imacd_308 < 0.0) { text_104 = "ggg"; color_176 = XDN_below_0; } Signal("SSignalMACD_TEXT", Adjust_Side_to_side + 153, Shift_UP_DN + 33); ObjectSetText("SSignalMACD_TEXT", "MACD", 6, "Arial Bold", BarLabel_color); Signal("SSignalMACDM1", Adjust_Side_to_side + 130, Shift_UP_DN + 35); ObjectSetText("SSignalMACDM1", text_128, 5, "Webdings", color_188); Signal("SSignalMACDM5", Adjust_Side_to_side + 110, Shift_UP_DN + 35); ObjectSetText("SSignalMACDM5", text_136, 5, "Webdings", color_192); Signal("SSignalMACDM15", Adjust_Side_to_side + 90, Shift_UP_DN + 35); ObjectSetText("SSignalMACDM15", text_144, 5, "Webdings", color_196); Signal("SSignalMACDM30", Adjust_Side_to_side + 70, Shift_UP_DN + 35); ObjectSetText("SSignalMACDM30", text_152, 5, "Webdings", color_200); Signal("SSignalMACDH1", Adjust_Side_to_side + 50, Shift_UP_DN + 35); ObjectSetText("SSignalMACDH1", text_112, 5, "Webdings", color_180); Signal("SSignalMACDH4", Adjust_Side_to_side + 30, Shift_UP_DN + 35); ObjectSetText("SSignalMACDH4", text_120, 5, "Webdings", color_184); Signal("SSignalMACDD1", Adjust_Side_to_side + 10, Shift_UP_DN + 35); ObjectSetText("SSignalMACDD1", text_104, 5, "Webdings", color_176); double irsi_324 = iRSI(NULL, TF7, RSI_Period, RSI_PRICE_TYPE, 0); double irsi_332 = iRSI(NULL, TF6, RSI_Period, RSI_PRICE_TYPE, 0); double irsi_340 = iRSI(NULL, TF5, RSI_Period, RSI_PRICE_TYPE, 0); double irsi_348 = iRSI(NULL, TF4, RSI_Period, RSI_PRICE_TYPE, 0); double irsi_356 = iRSI(NULL, TF3, RSI_Period, RSI_PRICE_TYPE, 0); double irsi_364 = iRSI(NULL, TF2, RSI_Period, RSI_PRICE_TYPE, 0); double irsi_372 = iRSI(NULL, TF1, RSI_Period, RSI_PRICE_TYPE, 0); double istochastic_380 = iStochastic(NULL, TF7, STOCH_K_Period, STOCH_D_Period, STOCH_Slowing, STOCH_MA_MODE, 0, MODE_MAIN, 0); double istochastic_388 = iStochastic(NULL, TF6, STOCH_K_Period, STOCH_D_Period, STOCH_Slowing, STOCH_MA_MODE, 0, MODE_MAIN, 0); double istochastic_396 = iStochastic(NULL, TF5, STOCH_K_Period, STOCH_D_Period, STOCH_Slowing, STOCH_MA_MODE, 0, MODE_MAIN, 0); double istochastic_404 = iStochastic(NULL, TF4, STOCH_K_Period, STOCH_D_Period, STOCH_Slowing, STOCH_MA_MODE, 0, MODE_MAIN, 0); double istochastic_412 = iStochastic(NULL, TF3, STOCH_K_Period, STOCH_D_Period, STOCH_Slowing, STOCH_MA_MODE, 0, MODE_MAIN, 0); double istochastic_420 = iStochastic(NULL, TF2, STOCH_K_Period, STOCH_D_Period, STOCH_Slowing, STOCH_MA_MODE, 0, MODE_MAIN, 0); double istochastic_428 = iStochastic(NULL, TF1, STOCH_K_Period, STOCH_D_Period, STOCH_Slowing, STOCH_MA_MODE, 0, MODE_MAIN, 0); double icci_436 = iCCI(NULL, TF7, CCI_Period, CCI_PRICE_TYPE, 0); double icci_444 = iCCI(NULL, TF6, CCI_Period, CCI_PRICE_TYPE, 0); double icci_452 = iCCI(NULL, TF5, CCI_Period, CCI_PRICE_TYPE, 0); double icci_460 = iCCI(NULL, TF4, CCI_Period, CCI_PRICE_TYPE, 0); double icci_468 = iCCI(NULL, TF3, CCI_Period, CCI_PRICE_TYPE, 0); double icci_476 = iCCI(NULL, TF2, CCI_Period, CCI_PRICE_TYPE, 0); double icci_484 = iCCI(NULL, TF1, CCI_Period, CCI_PRICE_TYPE, 0); string text_492 = ""; string text_500 = ""; string text_508 = ""; string text_516 = ""; string text_524 = ""; string text_532 = ""; string text_540 = ""; string ls_unused_548 = ""; string ls_unused_556 = ""; text_540 = "ggg"; color color_592 = STR_NO_Signal; text_524 = "ggg"; color color_588 = STR_NO_Signal; text_492 = "ggg"; color color_584 = STR_NO_Signal; text_532 = "ggg"; color color_580 = STR_NO_Signal; text_500 = "ggg"; color color_576 = STR_NO_Signal; text_508 = "ggg"; color color_572 = STR_NO_Signal; text_516 = "ggg"; color color_568 = STR_NO_Signal; if (irsi_324 > 50.0 && istochastic_380 > 40.0 && icci_436 > 0.0) { text_540 = "ggg"; color_592 = STR_UP; } if (irsi_332 > 50.0 && istochastic_388 > 40.0 && icci_444 > 0.0) { text_524 = "ggg"; color_588 = STR_UP; } if (irsi_340 > 50.0 && istochastic_396 > 40.0 && icci_452 > 0.0) { text_492 = "ggg"; color_584 = STR_UP; } if (irsi_348 > 50.0 && istochastic_404 > 40.0 && icci_460 > 0.0) { text_532 = "ggg"; color_580 = STR_UP; } if (irsi_356 > 50.0 && istochastic_412 > 40.0 && icci_468 > 0.0) { text_500 = "ggg"; color_576 = STR_UP; } if (irsi_364 > 50.0 && istochastic_420 > 40.0 && icci_476 > 0.0) { text_508 = "ggg"; color_572 = STR_UP; } if (irsi_372 > 50.0 && istochastic_428 > 40.0 && icci_484 > 0.0) { text_516 = "ggg"; color_568 = STR_UP; } if (irsi_324 < 50.0 && istochastic_380 < 60.0 && icci_436 < 0.0) { text_540 = "ggg"; color_592 = STR_DN; } if (irsi_332 < 50.0 && istochastic_388 < 60.0 && icci_444 < 0.0) { text_524 = "ggg"; color_588 = STR_DN; } if (irsi_340 < 50.0 && istochastic_396 < 60.0 && icci_452 < 0.0) { text_492 = "ggg"; color_584 = STR_DN; } if (irsi_348 < 50.0 && istochastic_404 < 60.0 && icci_460 < 0.0) { text_532 = "ggg"; color_580 = STR_DN; } if (irsi_356 < 50.0 && istochastic_412 < 60.0 && icci_468 < 0.0) { text_500 = "ggg"; color_576 = STR_DN; } if (irsi_364 < 50.0 && istochastic_420 < 60.0 && icci_476 < 0.0) { text_508 = "ggg"; color_572 = STR_DN; } if (irsi_372 < 50.0 && istochastic_428 < 60.0 && icci_484 < 0.0) { text_516 = "ggg"; color_568 = STR_DN; } Signal("SSignalSTR_TEXT", Adjust_Side_to_side + 153, Shift_UP_DN + 42); ObjectSetText("SSignalSTR_TEXT", "STR", 6, "Arial Bold", BarLabel_color); Signal("SignalSTRM1", Adjust_Side_to_side + 130, Shift_UP_DN + 44); ObjectSetText("SignalSTRM1", text_516, 5, "Webdings", color_568); Signal("SignalSTRM5", Adjust_Side_to_side + 110, Shift_UP_DN + 44); ObjectSetText("SignalSTRM5", text_508, 5, "Webdings", color_572); Signal("SignalSTRM15", Adjust_Side_to_side + 90, Shift_UP_DN + 44); ObjectSetText("SignalSTRM15", text_500, 5, "Webdings", color_576); Signal("SignalSTRM30", Adjust_Side_to_side + 70, Shift_UP_DN + 44); ObjectSetText("SignalSTRM30", text_532, 5, "Webdings", color_580); Signal("SignalSTRH1", Adjust_Side_to_side + 50, Shift_UP_DN + 44); ObjectSetText("SignalSTRH1", text_492, 5, "Webdings", color_584); Signal("SignalSTRH4", Adjust_Side_to_side + 30, Shift_UP_DN + 44); ObjectSetText("SignalSTRH4", text_524, 5, "Webdings", color_588); Signal("SignalSTRD1", Adjust_Side_to_side + 10, Shift_UP_DN + 44); ObjectSetText("SignalSTRD1", text_540, 5, "Webdings", color_592); double ima_604 = iMA(Symbol(), TF1, MA_Fast, 0, MA_MODE, MA_PRICE_TYPE, 0); double ima_612 = iMA(Symbol(), TF1, MA_Slow, 0, MA_MODE, MA_PRICE_TYPE, 0); double ima_620 = iMA(Symbol(), TF2, MA_Fast, 0, MA_MODE, MA_PRICE_TYPE, 0); double ima_628 = iMA(Symbol(), TF2, MA_Slow, 0, MA_MODE, MA_PRICE_TYPE, 0); double ima_636 = iMA(Symbol(), TF3, MA_Fast, 0, MA_MODE, MA_PRICE_TYPE, 0); double ima_644 = iMA(Symbol(), TF3, MA_Slow, 0, MA_MODE, MA_PRICE_TYPE, 0); double ima_652 = iMA(Symbol(), TF4, MA_Fast, 0, MA_MODE, MA_PRICE_TYPE, 0); double ima_660 = iMA(Symbol(), TF4, MA_Slow, 0, MA_MODE, MA_PRICE_TYPE, 0); double ima_668 = iMA(Symbol(), TF5, MA_Fast, 0, MA_MODE, MA_PRICE_TYPE, 0); double ima_676 = iMA(Symbol(), TF5, MA_Slow, 0, MA_MODE, MA_PRICE_TYPE, 0); double ima_684 = iMA(Symbol(), TF6, MA_Fast, 0, MA_MODE, MA_PRICE_TYPE, 0); double ima_692 = iMA(Symbol(), TF6, MA_Slow, 0, MA_MODE, MA_PRICE_TYPE, 0); double ima_700 = iMA(Symbol(), TF7, MA_Fast, 0, MA_MODE, MA_PRICE_TYPE, 0); double ima_708 = iMA(Symbol(), TF7, MA_Slow, 0, MA_MODE, MA_PRICE_TYPE, 0); string text_716 = ""; string text_724 = ""; string text_732 = ""; string text_740 = ""; string text_748 = ""; string text_756 = ""; string text_764 = ""; string ls_unused_772 = ""; string ls_unused_780 = ""; if (ima_604 > ima_612) { text_716 = "ggg"; color_796 = MA_UP; } if (ima_604 <= ima_612) { text_716 = "ggg"; color_796 = MA_DN; } if (ima_620 > ima_628) { text_724 = "ggg"; color_800 = MA_UP; } if (ima_620 <= ima_628) { text_724 = "ggg"; color_800 = MA_DN; } if (ima_636 > ima_644) { text_732 = "ggg"; color_804 = MA_UP; } if (ima_636 <= ima_644) { text_732 = "ggg"; color_804 = MA_DN; } if (ima_652 > ima_660) { text_740 = "ggg"; color_808 = MA_UP; } if (ima_652 <= ima_660) { text_740 = "ggg"; color_808 = MA_DN; } if (ima_668 > ima_676) { text_748 = "ggg"; color_812 = MA_UP; } if (ima_668 <= ima_676) { text_748 = "ggg"; color_812 = MA_DN; } if (ima_684 > ima_692) { text_756 = "ggg"; color_816 = MA_UP; } if (ima_684 <= ima_692) { text_756 = "ggg"; color_816 = MA_DN; } if (ima_700 > ima_708) { text_764 = "ggg"; color_820 = MA_UP; } if (ima_700 <= ima_708) { text_764 = "ggg"; color_820 = MA_DN; } Signal("SignalEMA_TEXT", Adjust_Side_to_side + 153, Shift_UP_DN + 51); ObjectSetText("SignalEMA_TEXT", "EMA", 6, "Arial Bold", BarLabel_color); Signal("SignalEMAM1", Adjust_Side_to_side + 130, Shift_UP_DN + 53); ObjectSetText("SignalEMAM1", text_716, 5, "Webdings", color_796); Signal("SignalEMAM5", Adjust_Side_to_side + 110, Shift_UP_DN + 53); ObjectSetText("SignalEMAM5", text_724, 5, "Webdings", color_800); Signal("SignalEMAM15", Adjust_Side_to_side + 90, Shift_UP_DN + 53); ObjectSetText("SignalEMAM15", text_732, 5, "Webdings", color_804); Signal("SignalEMAM30", Adjust_Side_to_side + 70, Shift_UP_DN + 53); ObjectSetText("SignalEMAM30", text_740, 5, "Webdings", color_808); Signal("SignalEMAH1", Adjust_Side_to_side + 50, Shift_UP_DN + 53); ObjectSetText("SignalEMAH1", text_748, 5, "Webdings", color_812); Signal("SignalEMAH4", Adjust_Side_to_side + 30, Shift_UP_DN + 53); ObjectSetText("SignalEMAH4", text_756, 5, "Webdings", color_816); Signal("SignalEMAD1", Adjust_Side_to_side + 10, Shift_UP_DN + 53); ObjectSetText("SignalEMAD1", text_764, 5, "Webdings", color_820); double ld_832 = NormalizeDouble(MarketInfo(Symbol(), MODE_BID), Digits); double ima_840 = iMA(Symbol(), PERIOD_M1, 1, 0, MODE_EMA, PRICE_CLOSE, 1); string ls_unused_848 = ""; if (ima_840 > ld_832) { ls_unused_848 = ""; color_856 = Price_DN; } if (ima_840 < ld_832) { ls_unused_848 = ""; color_856 = Price_UP; } if (ima_840 == ld_832) { ls_unused_848 = ""; color_856 = Price_Neutral; } Signal("cja", Adjust_Side_to_side + 153, Shift_UP_DN + 21); ObjectSetText("cja", "cja", 8, "Arial", DimGray); if (Show_Smaller_Size == FALSE) { if (Show_Price == TRUE) { Signal("Signalprice", Adjust_Side_to_side + 10, Shift_UP_DN + 56); ObjectSetText("Signalprice", DoubleToStr(ld_832, Digits), 35, "Arial", color_856); } } if (Show_Smaller_Size == TRUE) { if (Show_Price == TRUE) { Signal("Signalprice", Adjust_Side_to_side + 10, Shift_UP_DN + 60); ObjectSetText("Signalprice", DoubleToStr(ld_832, Digits), 15, "Arial", color_856); } } int li_860 = 0; int li_864 = 0; int li_868 = 0; int li_872 = 0; int li_876 = 0; int li_880 = 0; li_860 = (iHigh(NULL, PERIOD_D1, 1) - iLow(NULL, PERIOD_D1, 1)) / Point; for (li_880 = 1; li_880 <= 5; li_880++) li_864 = li_864 + (iHigh(NULL, PERIOD_D1, li_880) - iLow(NULL, PERIOD_D1, li_880)) / Point; for (li_880 = 1; li_880 <= 10; li_880++) li_868 = li_868 + (iHigh(NULL, PERIOD_D1, li_880) - iLow(NULL, PERIOD_D1, li_880)) / Point; for (li_880 = 1; li_880 <= 20; li_880++) li_872 = li_872 + (iHigh(NULL, PERIOD_D1, li_880) - iLow(NULL, PERIOD_D1, li_880)) / Point; li_864 /= 5; li_868 /= 10; li_872 /= 20; li_876 = (li_860 + li_864 + li_868 + li_872) / 4; string ls_unused_884 = ""; string ls_unused_892 = ""; string dbl2str_900 = ""; string dbl2str_908 = ""; string dbl2str_916 = ""; string dbl2str_924 = ""; string ls_unused_940 = ""; string ls_unused_948 = ""; string ls_956 = ""; double iopen_972 = iOpen(NULL, PERIOD_D1, 0); double iclose_980 = iClose(NULL, PERIOD_D1, 0); double ld_988 = (Ask - Bid) / Point; double ihigh_996 = iHigh(NULL, PERIOD_D1, 0); double ilow_1004 = iLow(NULL, PERIOD_D1, 0); dbl2str_908 = DoubleToStr((iclose_980 - iopen_972) / Point, 0); dbl2str_900 = DoubleToStr(ld_988, Digits - 4); dbl2str_916 = DoubleToStr(li_876, Digits - 4); ls_956 = (iHigh(NULL, PERIOD_D1, 1) - iLow(NULL, PERIOD_D1, 1)) / Point; dbl2str_924 = DoubleToStr((ihigh_996 - ilow_1004) / Point, 0); if (iclose_980 >= iopen_972) { ls_unused_940 = "-"; color_964 = Pips_UP; } if (iclose_980 < iopen_972) { ls_unused_940 = "-"; color_964 = Pips_DN; } if (dbl2str_916 >= ls_956) { ls_unused_948 = "-"; color_968 = Daily_AV_UP; } if (dbl2str_916 < ls_956) { ls_unused_948 = "-"; color_968 = Daily_AV_DN; } if (Show_Smaller_Size == FALSE) { if (Show_Xtra_Details == TRUE) { if (Show_Price == TRUE) { Signal("SIG_DETAIL_1", Adjust_Side_to_side + 45, Shift_UP_DN + 100); ObjectSetText("SIG_DETAIL_1", "Spread", 12, "Arial", CommentLabel_color); Signal("SIG_DETAIL_2", Adjust_Side_to_side + 10, Shift_UP_DN + 100); ObjectSetText("SIG_DETAIL_2", "" + dbl2str_900 + "", 12, "Arial Bold", Spread_color); Signal("SIG_DETAIL_3", Adjust_Side_to_side + 45, Shift_UP_DN + 115); ObjectSetText("SIG_DETAIL_3", "Pips to Open", 12, "Arial", CommentLabel_color); Signal("SIG_DETAIL_4", Adjust_Side_to_side + 10, Shift_UP_DN + 115); ObjectSetText("SIG_DETAIL_4", "" + dbl2str_908 + "", 12, "Arial Bold", color_964); Signal("SIG_DETAIL_5", Adjust_Side_to_side + 45, Shift_UP_DN + 130); ObjectSetText("SIG_DETAIL_5", "Hi to Low", 12, "Arial", CommentLabel_color); Signal("SIG_DETAIL_6", Adjust_Side_to_side + 10, Shift_UP_DN + 130); ObjectSetText("SIG_DETAIL_6", "" + dbl2str_924 + "", 12, "Arial Bold", HI_LO_color); Signal("SIG_DETAIL_7", Adjust_Side_to_side + 45, Shift_UP_DN + 145); ObjectSetText("SIG_DETAIL_7", "Daily Av", 12, "Arial", CommentLabel_color); Signal("SIG_DETAIL_8", Adjust_Side_to_side + 10, Shift_UP_DN + 145); ObjectSetText("SIG_DETAIL_8", "" + dbl2str_916 + "", 12, "Arial Bold", color_968); } } } if (Show_Smaller_Size == FALSE) { if (Show_Xtra_Details == TRUE) { if (Show_Price == FALSE) { Signal("SIG_DETAIL_1", Adjust_Side_to_side + 45, Shift_UP_DN + 60); ObjectSetText("SIG_DETAIL_1", "Spread", 12, "Arial", CommentLabel_color); Signal("SIG_DETAIL_2", Adjust_Side_to_side + 10, Shift_UP_DN + 60); ObjectSetText("SIG_DETAIL_2", "" + dbl2str_900 + "", 12, "Arial Bold", Spread_color); Signal("SIG_DETAIL_3", Adjust_Side_to_side + 45, Shift_UP_DN + 75); ObjectSetText("SIG_DETAIL_3", "Pips to Open", 12, "Arial", CommentLabel_color); Signal("SIG_DETAIL_4", Adjust_Side_to_side + 10, Shift_UP_DN + 75); ObjectSetText("SIG_DETAIL_4", "" + dbl2str_908 + "", 12, "Arial Bold", color_964); Signal("SIG_DETAIL_5", Adjust_Side_to_side + 45, Shift_UP_DN + 90); ObjectSetText("SIG_DETAIL_5", "Hi to Low", 12, "Arial", CommentLabel_color); Signal("SIG_DETAIL_6", Adjust_Side_to_side + 10, Shift_UP_DN + 90); ObjectSetText("SIG_DETAIL_6", "" + dbl2str_924 + "", 12, "Arial Bold", HI_LO_color); Signal("SIG_DETAIL_7", Adjust_Side_to_side + 45, Shift_UP_DN + 105); ObjectSetText("SIG_DETAIL_7", "Daily Av", 12, "Arial", CommentLabel_color); Signal("SIG_DETAIL_8", Adjust_Side_to_side + 10, Shift_UP_DN + 105); ObjectSetText("SIG_DETAIL_8", "" + dbl2str_916 + "", 12, "Arial Bold", color_968); } } } if (Show_Smaller_Size == TRUE) { if (Show_Xtra_Details == TRUE) { if (Show_Price == TRUE) { Signal("SIG_DETAIL_1", Adjust_Side_to_side + 40, Shift_UP_DN + 80); ObjectSetText("SIG_DETAIL_1", "Spread", 10, "Arial", CommentLabel_color); Signal("SIG_DETAIL_2", Adjust_Side_to_side + 10, Shift_UP_DN + 80); ObjectSetText("SIG_DETAIL_2", "" + dbl2str_900 + "", 9, "Arial Bold", Spread_color); Signal("SIG_DETAIL_3", Adjust_Side_to_side + 40, Shift_UP_DN + 95); ObjectSetText("SIG_DETAIL_3", "Pips to Open", 10, "Arial", CommentLabel_color); Signal("SIG_DETAIL_4", Adjust_Side_to_side + 10, Shift_UP_DN + 95); ObjectSetText("SIG_DETAIL_4", "" + dbl2str_908 + "", 9, "Arial Bold", color_964); Signal("SIG_DETAIL_5", Adjust_Side_to_side + 40, Shift_UP_DN + 110); ObjectSetText("SIG_DETAIL_5", "Hi to Low", 10, "Arial", CommentLabel_color); Signal("SIG_DETAIL_6", Adjust_Side_to_side + 10, Shift_UP_DN + 110); ObjectSetText("SIG_DETAIL_6", "" + dbl2str_924 + "", 9, "Arial Bold", HI_LO_color); Signal("SIG_DETAIL_7", Adjust_Side_to_side + 40, Shift_UP_DN + 125); ObjectSetText("SIG_DETAIL_7", "Daily Av", 10, "Arial", CommentLabel_color); Signal("SIG_DETAIL_8", Adjust_Side_to_side + 10, Shift_UP_DN + 125); ObjectSetText("SIG_DETAIL_8", "" + dbl2str_916 + "", 9, "Arial Bold", color_968); } } } if (Show_Smaller_Size == TRUE) { if (Show_Xtra_Details == TRUE) { if (Show_Price == FALSE) { Signal("SIG_DETAIL_1", Adjust_Side_to_side + 40, Shift_UP_DN + 60); ObjectSetText("SIG_DETAIL_1", "Spread", 10, "Arial", CommentLabel_color); Signal("SIG_DETAIL_2", Adjust_Side_to_side + 10, Shift_UP_DN + 60); ObjectSetText("SIG_DETAIL_2", "" + dbl2str_900 + "", 9, "Arial Bold", Spread_color); Signal("SIG_DETAIL_3", Adjust_Side_to_side + 40, Shift_UP_DN + 75); ObjectSetText("SIG_DETAIL_3", "Pips to Open", 10, "Arial", CommentLabel_color); Signal("SIG_DETAIL_4", Adjust_Side_to_side + 10, Shift_UP_DN + 75); ObjectSetText("SIG_DETAIL_4", "" + dbl2str_908 + "", 9, "Arial Bold", color_964); Signal("SIG_DETAIL_5", Adjust_Side_to_side + 40, Shift_UP_DN + 90); ObjectSetText("SIG_DETAIL_5", "Hi to Low", 10, "Arial", CommentLabel_color); Signal("SIG_DETAIL_6", Adjust_Side_to_side + 10, Shift_UP_DN + 90); ObjectSetText("SIG_DETAIL_6", "" + dbl2str_924 + "", 9, "Arial Bold", HI_LO_color); Signal("SIG_DETAIL_7", Adjust_Side_to_side + 40, Shift_UP_DN + 105); ObjectSetText("SIG_DETAIL_7", "Daily Av", 10, "Arial", CommentLabel_color); Signal("SIG_DETAIL_8", Adjust_Side_to_side + 10, Shift_UP_DN + 105); ObjectSetText("SIG_DETAIL_8", "" + dbl2str_916 + "", 9, "Arial Bold", color_968); } } } return (0); }
[download id="41"]

加载中…