Indicators Used
0
Views
0
Downloads
0
Favorites
X-Signals
//+------------------------------------------------------------------+
//_X-Signals_________________ \¦/
//_http://www.forex-tsd.com__(ò ó)
//______________________o0o___(_)___o0o__
//___¦_____¦_____¦mladen¦_____¦_____¦_____¦
//¦_cja_¦_____¦_____¦_____¦_____¦_____¦__
//___¦_____¦_____¦_____¦_Xard¦777__¦_____¦
//¦____¦ihldiaf¦_____¦_____¦_____¦____¦__
//___¦_____¦_____¦_____¦______¦hymns_¦____¦
//¦FxSniper___¦_____¦_igor_¦_____¦_____¦__
//+------------------------------------------------------------------+
#property indicator_separate_window
extern int K_period = 8;
extern int D_period = 3;
extern int S_period = 3;
extern bool Show_Stoch_Value = true;
double x=-80;
double xt=30;
extern int FastEMA = 8;
extern int SlowEMA = 17;
extern int SignalSMA = 9;
extern bool Show_MAJOR_TREND = true;
//+------------------------------------------------------------------+
int init()
{
//---- indicators
IndicatorShortName("XS");
//----
return(0);
}
//+------------------------------------------------------------------+
int deinit()
{
//----
ObjectsDeleteAll(0,OBJ_LABEL);
ObjectDelete("ObjLabel1"); ObjectDelete("ObjLabel2"); ObjectDelete("ObjLabel3"); ObjectDelete("ObjLabel4");
ObjectDelete("ObjLabel5"); ObjectDelete("ObjLabel6"); ObjectDelete("ObjLabel7"); ObjectDelete("ObjLabel8");
ObjectDelete("ObjLabel9"); ObjectDelete("ObjLabel10"); ObjectDelete("ObjLabel11"); ObjectDelete("ObjLabel12");
ObjectDelete("ObjLabel9a"); ObjectDelete("ObjLabel10a"); ObjectDelete("ObjLabel11a"); ObjectDelete("ObjLabel12a");
ObjectDelete("ObjLabel13"); ObjectDelete("ObjLabel14"); ObjectDelete("ObjLabel15"); ObjectDelete("ObjLabel16");
ObjectDelete("ObjLabel13a"); ObjectDelete("ObjLabel14a"); ObjectDelete("ObjLabel15a"); ObjectDelete("ObjLabel16a");
ObjectDelete("SSIG1"); ObjectDelete("SSIG2"); ObjectDelete("SSIG3"); ObjectDelete("SSIG4"); ObjectDelete("SSIG5"); ObjectDelete("SSIG6");
ObjectDelete("Label1"); ObjectDelete("Label2"); ObjectDelete("Label3");
ObjectDelete("DataM1"); ObjectDelete("DataM5"); ObjectDelete("DataM15");
ObjectDelete("DataM30"); ObjectDelete("DataH1"); ObjectDelete("DataH4");
ObjectDelete("DataD1"); ObjectDelete("DataW1"); ObjectDelete("DataMN");
ObjectDelete("Trend1"); ObjectDelete("Trend2"); ObjectDelete("Level1");
//----
return(0);
}
//+------------------------------------------------------------------+
int start()
{
//m1 data
double stoch_main_m1 = iStochastic(NULL,PERIOD_M1,K_period,D_period,S_period,MODE_SMA,1,MODE_MAIN,0);
double stoch_sig_m1 = iStochastic(NULL,PERIOD_M1,K_period,D_period,S_period,MODE_SMA,1,MODE_SIGNAL,0);
//m5 data
double stoch_main_m5 = iStochastic(NULL,PERIOD_M5,K_period,D_period,S_period,MODE_SMA,1,MODE_MAIN,0);
double stoch_sig_m5 = iStochastic(NULL,PERIOD_M5,K_period,D_period,S_period,MODE_SMA,1,MODE_SIGNAL,0);
//m15 data
double stoch_main_m15 = iStochastic(NULL,PERIOD_M15,K_period,D_period,S_period,MODE_SMA,1,MODE_MAIN,0);
double stoch_sig_m15 = iStochastic(NULL,PERIOD_M15,K_period,D_period,S_period,MODE_SMA,1,MODE_SIGNAL,0);
//m30 data
double stoch_main_m30 = iStochastic(NULL,PERIOD_M30,K_period,D_period,S_period,MODE_SMA,1,MODE_MAIN,0);
double stoch_sig_m30 = iStochastic(NULL,PERIOD_M30,K_period,D_period,S_period,MODE_SMA,1,MODE_SIGNAL,0);
//h1 data
double stoch_main_h1 = iStochastic(NULL,PERIOD_H1,K_period,D_period,S_period,MODE_SMA,1,MODE_MAIN,0);
double stoch_sig_h1 = iStochastic(NULL,PERIOD_H1,K_period,D_period,S_period,MODE_SMA,1,MODE_SIGNAL,0);
//h4 data
double stoch_main_h4 = iStochastic(NULL,PERIOD_H4,K_period,D_period,S_period,MODE_SMA,1,MODE_MAIN,0);
double stoch_sig_h4 = iStochastic(NULL,PERIOD_H4,K_period,D_period,S_period,MODE_SMA,1,MODE_SIGNAL,0);
//+------------------------------------------------------------------+
double macd_M1=iMACD(NULL,PERIOD_M1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_MM1=iMACD(NULL,PERIOD_M1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_M5=iMACD(NULL,PERIOD_M5,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_MM5=iMACD(NULL,PERIOD_M5,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_M15=iMACD(NULL,PERIOD_M15,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_MM15=iMACD(NULL,PERIOD_M15,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_M30=iMACD(NULL,PERIOD_M30,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_MM30=iMACD(NULL,PERIOD_M30,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_H1=iMACD(NULL,PERIOD_H1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_HH1=iMACD(NULL,PERIOD_H1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_H4=iMACD(NULL,PERIOD_H4,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_HH4=iMACD(NULL,PERIOD_H4,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
//+------------------------------------------------------------------+
if (Show_MAJOR_TREND == true)
{
double macd_D1=iMACD(NULL,PERIOD_D1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_DD1=iMACD(NULL,PERIOD_D1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_W1=iMACD(NULL,PERIOD_W1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_WW1=iMACD(NULL,PERIOD_W1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
double macd_MN1=iMACD(NULL,PERIOD_MN1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_MAIN,0);
double macd_MMN1=iMACD(NULL,PERIOD_MN1,FastEMA,SlowEMA,SignalSMA,PRICE_CLOSE,MODE_SIGNAL,0);
}
//+------------------------------------------------------------------+
//define color
color stoch_color_m1, stoch_color_m5, stoch_color_m15, stoch_color_m30, stoch_color_h1, stoch_color_h4;
//+------------------------------------------------------------------+
//define string
string stoch_level_m1, stoch_level_m5, stoch_level_m15, stoch_level_m30, stoch_level_h1, stoch_level_h4,
stoch_arrow_m1, stoch_arrow_m5, stoch_arrow_m15, stoch_arrow_m30, stoch_arrow_h1, stoch_arrow_h4;
//+------------------------------------------------------------------+
//m1 up trend
if ((stoch_main_m1 >= stoch_sig_m1) && (stoch_sig_m1 < 20) && (stoch_sig_m1 != 0)) { stoch_color_m1 = YellowGreen; }
if ((stoch_main_m1 >= stoch_sig_m1) && (stoch_sig_m1 >= 20) && (stoch_sig_m1 <= 80)) { stoch_color_m1 = Lime; }
if ((stoch_main_m1 >= stoch_sig_m1) && (stoch_sig_m1 > 80)) { stoch_color_m1 = Green; }
//+------------------------------------------------------------------+
//m1 down trend
if ((stoch_main_m1 <= stoch_sig_m1) && (stoch_sig_m1 > 80) && (stoch_sig_m1 != 100)) { stoch_color_m1 = Tomato; }
if ((stoch_main_m1 <= stoch_sig_m1) && (stoch_sig_m1 >= 20) && (stoch_sig_m1 <= 80)) { stoch_color_m1 = Red; }
if ((stoch_main_m1 <= stoch_sig_m1) && (stoch_sig_m1 < 20)) { stoch_color_m1 = FireBrick; }
//+------------------------------------------------------------------+
//m5 up trend
if ((stoch_main_m5 >= stoch_sig_m5) && (stoch_sig_m5 < 20) && (stoch_sig_m5 != 0)) { stoch_color_m5 = YellowGreen; }
if ((stoch_main_m5 >= stoch_sig_m5) && (stoch_sig_m5 >= 20) && (stoch_sig_m5 <= 80)) { stoch_color_m5 = Lime; }
if ((stoch_main_m5 >= stoch_sig_m5) && (stoch_sig_m5 > 80)) { stoch_color_m5 = Green; }
//+------------------------------------------------------------------+
//m5 down trend
if ((stoch_main_m5 <= stoch_sig_m5) && (stoch_sig_m5 > 80) && (stoch_sig_m5 != 100)) { stoch_color_m5 = Tomato; }
if ((stoch_main_m5 <= stoch_sig_m5) && (stoch_sig_m5 >= 20) && (stoch_sig_m5 <= 80)) { stoch_color_m5 = Red; }
if ((stoch_main_m5 <= stoch_sig_m5) && (stoch_sig_m5 < 20)) { stoch_color_m5 = FireBrick; }
//+------------------------------------------------------------------+
//m15 up trend
if ((stoch_main_m15 >= stoch_sig_m15) && (stoch_sig_m15 < 20) && (stoch_sig_m15 != 0)) { stoch_color_m15 = YellowGreen; }
if ((stoch_main_m15 >= stoch_sig_m15) && (stoch_sig_m15 >= 20) && (stoch_sig_m15 <= 80)) { stoch_color_m15 = Lime; }
if ((stoch_main_m15 >= stoch_sig_m15) && (stoch_sig_m15 > 80)) { stoch_color_m15 = Green; }
//+------------------------------------------------------------------+
//m15 down trend
if ((stoch_main_m15 <= stoch_sig_m15) && (stoch_sig_m15 > 80) && (stoch_sig_m15 != 100)) { stoch_color_m15 = Tomato; }
if ((stoch_main_m15 <= stoch_sig_m15) && (stoch_sig_m15 >= 20) && (stoch_sig_m15 <= 80)) { stoch_color_m15 = Red; }
if ((stoch_main_m15 <= stoch_sig_m15) && (stoch_sig_m15 < 20)) { stoch_color_m15 = FireBrick; }
//+------------------------------------------------------------------+
//m30 up trend
if ((stoch_main_m30 >= stoch_sig_m30) && (stoch_sig_m30 < 20) && (stoch_sig_m30 != 0)) { stoch_color_m30 = YellowGreen; }
if ((stoch_main_m30 >= stoch_sig_m30) && (stoch_sig_m30 >= 20) && (stoch_sig_m30 <= 80)) { stoch_color_m30 = Lime; }
if ((stoch_main_m30 >= stoch_sig_m30) && (stoch_sig_m30 > 80)) { stoch_color_m30 = Green; }
//+------------------------------------------------------------------+
//m30 down trend
if ((stoch_main_m30 <= stoch_sig_m30) && (stoch_sig_m30 > 80) && (stoch_sig_m30 != 100)) { stoch_color_m30 = Tomato; }
if ((stoch_main_m30 <= stoch_sig_m30) && (stoch_sig_m30 >= 20) && (stoch_sig_m30 <= 80)) { stoch_color_m30 = Red; }
if ((stoch_main_m30 <= stoch_sig_m30) && (stoch_sig_m30 < 20)) { stoch_color_m30 = FireBrick; }
//+------------------------------------------------------------------+
//h1 up trend
if ((stoch_main_h1 >= stoch_sig_h1) && (stoch_sig_h1 < 20) && (stoch_sig_h1 != 0)) { stoch_color_h1 = YellowGreen; }
if ((stoch_main_h1 >= stoch_sig_h1) && (stoch_sig_h1 >= 20) && (stoch_sig_h1 <= 80)) { stoch_color_h1 = Lime; }
if ((stoch_main_h1 >= stoch_sig_h1) && (stoch_sig_h1 > 80)) { stoch_color_h1 = Green; }
//+------------------------------------------------------------------+
//h1 down trend
if ((stoch_main_h1 <= stoch_sig_h1) && (stoch_sig_h1 > 80) && (stoch_sig_h1 != 100)) { stoch_color_h1 = Tomato; }
if ((stoch_main_h1 <= stoch_sig_h1) && (stoch_sig_h1 >= 20) && (stoch_sig_h1 <= 80)) { stoch_color_h1 = Red; }
if ((stoch_main_h1 <= stoch_sig_h1) && (stoch_sig_h1 < 20)) { stoch_color_h1 = FireBrick; }
//+------------------------------------------------------------------+
//h4 up trend
if ((stoch_main_h4 >= stoch_sig_h4) && (stoch_sig_h4 < 20) && (stoch_sig_h4 != 0)) { stoch_color_h4 = YellowGreen; }
if ((stoch_main_h4 >= stoch_sig_h4) && (stoch_sig_h4 >= 20) && (stoch_sig_h4 <= 80)) { stoch_color_h4 = Lime; }
if ((stoch_main_h4 >= stoch_sig_h4) && (stoch_sig_h4 > 80)) { stoch_color_h4 = Green; }
//+------------------------------------------------------------------+
//h4 down trend
if ((stoch_main_h4 <= stoch_sig_h4) && (stoch_sig_h4 > 80) && (stoch_sig_h4 != 100)) { stoch_color_h4 = Tomato; }
if ((stoch_main_h4 <= stoch_sig_h4) && (stoch_sig_h4 >= 20) && (stoch_sig_h4 <= 80)) { stoch_color_h4 = Red; }
if ((stoch_main_h4 <= stoch_sig_h4) && (stoch_sig_h4 < 20)) { stoch_color_h4 = FireBrick; }
//+------------------------------------------------------------------+
string trend_signal = "", trend_main = "", trend_level = "";
color color_m1, color_m5, color_m15, color_m30, color_h1, color_h4, color_d1, color_w1, color_mn,
color_signal, color_main, color_level;
//+------------------------------------------------------------------+
// UP Data
if ((macd_M5 > macd_MM5) && (macd_M1 > macd_MM1)) { trend_signal = "UP"; color_signal = Lime;}
//Down Data
if ((macd_M5 < macd_MM5) && (macd_M1 < macd_MM1)) { trend_signal = "DN"; color_signal = Red; }
//+------------------------------------------------------------------+
//Consolidation Data
if ((macd_M5 < macd_MM5) && (macd_M1 > macd_MM1)) { trend_signal = "SY"; color_signal = Orange; }
if ((macd_M5 > macd_MM5) && (macd_M1 < macd_MM1)) { trend_signal = "SY"; color_signal = Orange; }
if ((macd_M15 < macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 > macd_HH1)&& (macd_H4 < macd_HH4)) { trend_level = "WEAK"; color_level = Tomato; }
if ((macd_M15 > macd_MM15) && (macd_M30 < macd_MM30) && (macd_H1 < macd_HH1)&& (macd_H4 > macd_HH4)) { trend_level = "WEAK"; color_level = Tomato; }
if ((macd_M15 < macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 < macd_HH1) && (macd_H4 < macd_HH4)) { trend_level = "MEDIUM"; color_level = Orange; }
if ((macd_M15 > macd_MM15) && (macd_M30 < macd_MM30) && (macd_H1 > macd_HH1) && (macd_H4 > macd_HH4)) { trend_level = "MEDIUM"; color_level = Orange; }
//+------------------------------------------------------------------+
if ((macd_M5 > macd_MM5) && (macd_M15 > macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 < macd_HH1) && (macd_H4 > macd_HH4)) { trend_level = "MEDIUM"; color_level = Orange; }
if ((macd_M5 < macd_MM5) && (macd_M15 < macd_MM15) && (macd_M30 < macd_MM30) && (macd_H1 >macd_HH1) && (macd_H4 < macd_HH4)) { trend_level = "MEDIUM"; color_level = Orange; }
if ((macd_M15 < macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 > macd_HH1)) { trend_main = "UP"; color_main = YellowGreen; }
if ((macd_M15 > macd_MM15) && (macd_M30 < macd_MM30) && (macd_H1 < macd_HH1)) { trend_main = "DN"; color_main = Tomato; }
if ((macd_M15 < macd_MM15) && (macd_M30 < macd_MM30) && (macd_H1 > macd_HH1)) { trend_main = "DN"; color_main = Tomato; }
if ((macd_M15 > macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 < macd_HH1)) { trend_main = "UP"; color_main = YellowGreen; }
if ((macd_M15 < macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 < macd_HH1)) { trend_main = "DN"; color_main = Red; }
if ((macd_M15 > macd_MM15) && (macd_M30 < macd_MM30) && (macd_H1 > macd_HH1)) { trend_main = "UP"; color_main = Lime; }
if ((macd_M5 < macd_MM5) && (macd_M15 < macd_MM15) && (macd_H1 > macd_HH1) && (macd_H4 > macd_HH4)) { trend_level = "WEAK"; color_level = Tomato; }
if ((macd_M5 > macd_MM5) && (macd_M15 > macd_MM15) && (macd_H1 < macd_HH1) && (macd_H4 < macd_HH4)) { trend_level = "WEAK"; color_level = Tomato; }
if ((macd_M15 > macd_MM15) && (macd_H1 > macd_HH1) && (macd_M30 > macd_MM30) && (macd_H4 < macd_HH4)) { trend_level = "MEDIUM"; color_level = Orange; }
if ((macd_M15 < macd_MM15) && (macd_H1 < macd_HH1) && (macd_M30 < macd_MM30) && (macd_H4 > macd_HH4)) { trend_level = "MEDIUM"; color_level = Orange; }
if ((macd_M15 > macd_MM15) && (macd_H1 > macd_HH1) && (macd_M30 > macd_MM30) && (macd_H4 > macd_HH4)) { trend_level = "STRONG"; color_level = Yellow; }
if ((macd_M15 < macd_MM15) && (macd_H1 < macd_HH1) && (macd_M30 < macd_MM30) && (macd_H4 < macd_HH4)) { trend_level = "STRONG"; color_level = Yellow; }
if ((macd_M15 > macd_MM15) && (macd_H1 > macd_HH1) && (macd_M30 > macd_MM30) && (macd_H4 > macd_HH4)) { trend_main = "UP"; color_main = Lime; }
if ((macd_M15 < macd_MM15) && (macd_H1 < macd_HH1) && (macd_M30 < macd_MM30) && (macd_H4 < macd_HH4)) { trend_main = "DN"; color_main = Red; }
if ((macd_M15 > macd_MM15) && (macd_H1 > macd_HH1) && (macd_M30 > macd_MM30) && (macd_H4 < macd_HH4)) { trend_main = "UP"; color_main = Lime; }
if ((macd_M15 < macd_MM15) && (macd_H1 < macd_HH1) && (macd_M30 < macd_MM30) && (macd_H4 > macd_HH4)) { trend_main = "DN"; color_main = Red; }
//+------------------------------------------------------------------+
//MACD Direction
if ((macd_M1 > macd_MM1)) { color_m1 = Lime; }
if ((macd_M1 < macd_MM1)) { color_m1 = Red; }
if ((macd_M5 > macd_MM5)) { color_m5 = Lime; }
if ((macd_M5 < macd_MM5)) { color_m5 = Red; }
if ((macd_M15 > macd_MM15)) { color_m15 = Lime; }
if ((macd_M15 < macd_MM15)) { color_m15 = Red; }
if ((macd_M30 > macd_MM30)) { color_m30 = Lime; }
if ((macd_M30 < macd_MM30)) { color_m30 = Red; }
if ((macd_H1 > macd_HH1)) { color_h1 = Lime; }
if ((macd_H1 < macd_HH1)) { color_h1 = Red; }
if ((macd_H4 > macd_HH4)) { color_h4 = Lime; }
if ((macd_H4 < macd_HH4)) { color_h4 = Red; }
//+------------------------------------------------------------------+
if (Show_MAJOR_TREND == true)
{
if ((macd_D1 > macd_DD1)) { color_d1 = Lime; }
if ((macd_D1 < macd_DD1)) { color_d1 = Red; }
if ((macd_W1 > macd_WW1)) { color_w1 = Lime; }
if ((macd_W1 < macd_WW1)) { color_w1 = Red; }
if ((macd_MN1 > macd_MMN1)) { color_mn = Lime; }
if ((macd_MN1 < macd_MMN1)) { color_mn = Red; }
}
//+------------------------------------------------------------------+
if (Show_MAJOR_TREND == true)
{
ObjectCreate("DataD1", OBJ_LABEL, WindowFind("XS"), 0, 0);//D1 SIGNAL
ObjectSetText("DataD1","D1",9, "Arial Bold", color_d1);
ObjectSet("DataD1", OBJPROP_CORNER, 0);
ObjectSet("DataD1", OBJPROP_XDISTANCE, 490);
ObjectSet("DataD1", OBJPROP_YDISTANCE, 4);
ObjectCreate("DataW1", OBJ_LABEL, WindowFind("XS"), 0, 0);//W1 SIGNAL
ObjectSetText("DataW1","W1",9, "Arial Bold", color_w1);
ObjectSet("DataW1", OBJPROP_CORNER, 0);
ObjectSet("DataW1", OBJPROP_XDISTANCE, 515);
ObjectSet("DataW1", OBJPROP_YDISTANCE, 4);
ObjectCreate("DataMN", OBJ_LABEL, WindowFind("XS"), 0, 0);//MN SIGNAL
ObjectSetText("DataMN","MN",9, "Arial Bold", color_mn);
ObjectSet("DataMN", OBJPROP_CORNER, 0);
ObjectSet("DataMN", OBJPROP_XDISTANCE, 545);
ObjectSet("DataMN", OBJPROP_YDISTANCE, 4);
}
//+------------------------------------------------------------------+
//Show Digital Stochastic Value
if (Show_Stoch_Value == true)
{
//stochastic value
string stoch_m1_val = stoch_sig_m1;
string stoch_m5_val = stoch_sig_m5;
string stoch_m15_val = stoch_sig_m15;
string stoch_m30_val = stoch_sig_m30;
string stoch_h1_val = stoch_sig_h1;
string stoch_h4_val = stoch_sig_h4;
if (stoch_main_m1 >= stoch_sig_m1 && stoch_sig_m1 > 0) { stoch_arrow_m1 = "Ù"; }
if (stoch_main_m1 <= stoch_sig_m1 && stoch_sig_m1 < 100) { stoch_arrow_m1 = "Ú"; }
if (stoch_main_m5 >= stoch_sig_m5 && stoch_sig_m5 > 0) { stoch_arrow_m5 = "Ù"; }
if (stoch_main_m5 <= stoch_sig_m5 && stoch_sig_m5 < 100) { stoch_arrow_m5 = "Ú"; }
if (stoch_main_m15 >= stoch_sig_m15 && stoch_sig_m15 > 0) { stoch_arrow_m15 = "Ù"; }
if (stoch_main_m15 <= stoch_sig_m15 && stoch_sig_m15 < 100) { stoch_arrow_m15 = "Ú"; }
if (stoch_main_m30 >= stoch_sig_m30 && stoch_sig_m30 > 0) { stoch_arrow_m30 = "Ù"; }
if (stoch_main_m30 <= stoch_sig_m30 && stoch_sig_m30 < 100) { stoch_arrow_m30 = "Ú"; }
if (stoch_main_h1 >= stoch_sig_h1 && stoch_sig_h1 > 0) { stoch_arrow_h1 = "Ù"; }
if (stoch_main_h1 <= stoch_sig_h1 && stoch_sig_h1 < 100) { stoch_arrow_h1 = "Ú"; }
if (stoch_main_h4 >= stoch_sig_h4 && stoch_sig_h4 > 0) { stoch_arrow_h4 = "Ù"; }
if (stoch_main_h4 <= stoch_sig_h4 && stoch_sig_h4 < 100) { stoch_arrow_h4 = "Ú"; }
//+------------------------------------------------------------------+
//MACD Direction M1-M5
ObjectCreate("DataM1", OBJ_LABEL, WindowFind("XS"), 0, 0);//M1 SIGNAL
ObjectSetText("DataM1","M1",9, "Arial Bold", color_m1);
ObjectSet("DataM1", OBJPROP_CORNER, 0);
ObjectSet("DataM1", OBJPROP_XDISTANCE, 227+xt);
ObjectSet("DataM1", OBJPROP_YDISTANCE, 4);
ObjectCreate("DataM5", OBJ_LABEL, WindowFind("XS"), 0, 0);//M5 SIGNAL
ObjectSetText("DataM5","M5",9, "Arial Bold", color_m5);
ObjectSet("DataM5", OBJPROP_CORNER, 0);
ObjectSet("DataM5", OBJPROP_XDISTANCE, 250+xt);
ObjectSet("DataM5", OBJPROP_YDISTANCE, 4);
//+------------------------------------------------------------------+
//M1 & M5 TREND Data
ObjectCreate("Trend1", OBJ_LABEL, WindowFind("XS"), 0, 0);
ObjectSetText("Trend1",trend_signal,12, "Arial Bold", color_signal);
ObjectSet("Trend1", OBJPROP_CORNER, 0);
ObjectSet("Trend1", OBJPROP_XDISTANCE, 272+xt);
ObjectSet("Trend1", OBJPROP_YDISTANCE, 4);
//+------------------------------------------------------------------+
//Main Trend Label
//MACD Direction M15-H4
ObjectCreate("DataM15", OBJ_LABEL, WindowFind("XS"), 0, 0);//M15 SIGNAL
ObjectSetText("DataM15","M15",9, "Arial Bold", color_m15);
ObjectSet("DataM15", OBJPROP_CORNER, 0);
ObjectSet("DataM15", OBJPROP_XDISTANCE, 315+xt);
ObjectSet("DataM15", OBJPROP_YDISTANCE, 4);
ObjectCreate("DataM30", OBJ_LABEL, WindowFind("XS"), 0, 0);//M30 SIGNAL
ObjectSetText("DataM30","M30",9, "Arial Bold", color_m30);
ObjectSet("DataM30", OBJPROP_CORNER, 0);
ObjectSet("DataM30", OBJPROP_XDISTANCE, 345+xt);
ObjectSet("DataM30", OBJPROP_YDISTANCE, 4);
ObjectCreate("DataH1", OBJ_LABEL, WindowFind("XS"), 0, 0);//H1 SIGNAL
ObjectSetText("DataH1","H1",9, "Arial Bold", color_h1);
ObjectSet("DataH1", OBJPROP_CORNER, 0);
ObjectSet("DataH1", OBJPROP_XDISTANCE, 375+xt);
ObjectSet("DataH1", OBJPROP_YDISTANCE, 4);
ObjectCreate("DataH4", OBJ_LABEL, WindowFind("XS"), 0, 0);//H4 SIGNAL
ObjectSetText("DataH4","H4",9, "Arial Bold", color_h4);
ObjectSet("DataH4", OBJPROP_CORNER, 0);
ObjectSet("DataH4", OBJPROP_XDISTANCE, 395+xt);
ObjectSet("DataH4", OBJPROP_YDISTANCE, 4);
//+------------------------------------------------------------------+
//M15 - H4 TREND Data
ObjectCreate("Trend2", OBJ_LABEL, WindowFind("XS"), 0, 0);
ObjectSetText("Trend2",trend_main,12, "Arial Bold", color_main);
ObjectSet("Trend2", OBJPROP_CORNER, 0);
ObjectSet("Trend2", OBJPROP_XDISTANCE, 415+xt);
ObjectSet("Trend2", OBJPROP_YDISTANCE, 4);
//Level Data
ObjectCreate("Level1", OBJ_LABEL, WindowFind("XS"), 0, 0);
ObjectSetText("Level1",trend_level,8, "Arial Bold", color_level);
ObjectSet("Level1", OBJPROP_CORNER, 0);
ObjectSet("Level1", OBJPROP_XDISTANCE, 345+xt);
ObjectSet("Level1", OBJPROP_YDISTANCE, 15);
//+------------------------------------------------------------------+
//stochastic value
//stoch m1 value
ObjectCreate("ObjLabel9", OBJ_LABEL, WindowFind("XS"), 0, 0);
ObjectSetText("ObjLabel9","M1 : "+StringSubstr(stoch_m1_val,0,5)+" ",8, "Arial Bold", stoch_color_m1);
ObjectSet("ObjLabel9", OBJPROP_CORNER, 0);
ObjectSet("ObjLabel9", OBJPROP_XDISTANCE, 120+x);
ObjectSet("ObjLabel9", OBJPROP_YDISTANCE, 2);
//arrow m1
ObjectCreate("ObjLabel9a", OBJ_LABEL, WindowFind("XS"), 0, 0);
ObjectSetText("ObjLabel9a",stoch_arrow_m1,8, "Wingdings", stoch_color_m1);
ObjectSet("ObjLabel9a", OBJPROP_CORNER, 0);
ObjectSet("ObjLabel9a", OBJPROP_XDISTANCE, 175+x);
ObjectSet("ObjLabel9a", OBJPROP_YDISTANCE, 3);
//+------------------------------------------------------------------+
//stoch m30 value
ObjectCreate("ObjLabel10", OBJ_LABEL, WindowFind("XS"), 0, 0);
ObjectSetText("ObjLabel10","M30: "+StringSubstr(stoch_m30_val,0,5),8, "Arial Bold", stoch_color_m30);
ObjectSet("ObjLabel10", OBJPROP_CORNER, 0);
ObjectSet("ObjLabel10", OBJPROP_XDISTANCE, 120+x);
ObjectSet("ObjLabel10", OBJPROP_YDISTANCE, 12);
//arrow m30
ObjectCreate("ObjLabel10a", OBJ_LABEL, WindowFind("XS"), 0, 0);
ObjectSetText("ObjLabel10a",stoch_arrow_m30,8, "Wingdings", stoch_color_m30);
ObjectSet("ObjLabel10a", OBJPROP_CORNER, 0);
ObjectSet("ObjLabel10a", OBJPROP_XDISTANCE, 175+x);
ObjectSet("ObjLabel10a", OBJPROP_YDISTANCE, 13);
//+------------------------------------------------------------------+
//stoch m5 value
ObjectCreate("ObjLabel11", OBJ_LABEL, WindowFind("XS"), 0, 0);
ObjectSetText("ObjLabel11","M5: "+StringSubstr(stoch_m5_val,0,5),8, "Arial Bold", stoch_color_m5);
ObjectSet("ObjLabel11", OBJPROP_CORNER, 0);
ObjectSet("ObjLabel11", OBJPROP_XDISTANCE, 190+x);
ObjectSet("ObjLabel11", OBJPROP_YDISTANCE, 2);
//arrow m5
ObjectCreate("ObjLabel11a", OBJ_LABEL, WindowFind("XS"), 0, 0);
ObjectSetText("ObjLabel11a",stoch_arrow_m5,8, "Wingdings", stoch_color_m5);
ObjectSet("ObjLabel11a", OBJPROP_CORNER, 0);
ObjectSet("ObjLabel11a", OBJPROP_XDISTANCE, 240+x);
ObjectSet("ObjLabel11a", OBJPROP_YDISTANCE, 3);
//+------------------------------------------------------------------+
//stoch h1 value
ObjectCreate("ObjLabel12", OBJ_LABEL, WindowFind("XS"), 0, 0);
ObjectSetText("ObjLabel12","H1 : "+StringSubstr(stoch_h1_val,0,5),8, "Arial Bold", stoch_color_h1);
ObjectSet("ObjLabel12", OBJPROP_CORNER, 0);
ObjectSet("ObjLabel12", OBJPROP_XDISTANCE, 190+x);
ObjectSet("ObjLabel12", OBJPROP_YDISTANCE, 12);
//arrow h1
ObjectCreate("ObjLabel12a", OBJ_LABEL, WindowFind("XS"), 0, 0);
ObjectSetText("ObjLabel12a",stoch_arrow_h1,8, "Wingdings", stoch_color_h1);
ObjectSet("ObjLabel12a", OBJPROP_CORNER, 0);
ObjectSet("ObjLabel12a", OBJPROP_XDISTANCE, 240+x);
ObjectSet("ObjLabel12a", OBJPROP_YDISTANCE, 13);
//+------------------------------------------------------------------+
//stoch m15 value
ObjectCreate("ObjLabel13", OBJ_LABEL, WindowFind("XS"), 0, 0);
ObjectSetText("ObjLabel13","M15: "+StringSubstr(stoch_m15_val,0,5),8, "Arial Bold", stoch_color_m15);
ObjectSet("ObjLabel13", OBJPROP_CORNER, 0);
ObjectSet("ObjLabel13", OBJPROP_XDISTANCE, 255+x);
ObjectSet("ObjLabel13", OBJPROP_YDISTANCE, 2);
//arrow m15
ObjectCreate("ObjLabel13a", OBJ_LABEL, WindowFind("XS"), 0, 0);
ObjectSetText("ObjLabel13a",stoch_arrow_m15,8, "Wingdings", stoch_color_m15);
ObjectSet("ObjLabel13a", OBJPROP_CORNER, 0);
ObjectSet("ObjLabel13a", OBJPROP_XDISTANCE, 312+x);
ObjectSet("ObjLabel13a", OBJPROP_YDISTANCE, 3);
//+------------------------------------------------------------------+
//stoch h4 value
ObjectCreate("ObjLabel14", OBJ_LABEL, WindowFind("XS"), 0, 0);
ObjectSetText("ObjLabel14","H4 : "+StringSubstr(stoch_h4_val,0,5),8, "Arial Bold", stoch_color_h4);
ObjectSet("ObjLabel14", OBJPROP_CORNER, 0);
ObjectSet("ObjLabel14", OBJPROP_XDISTANCE, 255+x);
ObjectSet("ObjLabel14", OBJPROP_YDISTANCE, 12);
//arrow h4
ObjectCreate("ObjLabel14a", OBJ_LABEL, WindowFind("XS"), 0, 0);
ObjectSetText("ObjLabel14a",stoch_arrow_h4,8, "Wingdings", stoch_color_h4);
ObjectSet("ObjLabel14a", OBJPROP_CORNER, 0);
ObjectSet("ObjLabel14a", OBJPROP_XDISTANCE, 312+x);
ObjectSet("ObjLabel14a", OBJPROP_YDISTANCE, 13);
}
//+------------------------------------------------------------------+
return(0);
}
//+----The End-------------------------------------------------------+
Comments
Markdown Formatting Guide
# H1
## H2
### H3
**bold text**
*italicized text*
[title](https://www.example.com)

`code`
```
code block
```
> blockquote
- Item 1
- Item 2
1. First item
2. Second item
---