//+------------------------------------------------------------------+ //| G#MACD_Trading_Signals #2.mq4 | //| Copyright © 2006, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "Copyright © 2006, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" #property indicator_separate_window extern int FastEMA=8; extern int SlowEMA=17; extern int SignalSMA=9; extern bool Show_MAJOR_TREND = true; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators IndicatorShortName("GMACD"); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- ObjectsDeleteAll(0,OBJ_LABEL); ObjectDelete("SIG"); ObjectDelete("SIG1"); ObjectDelete("SIG2"); ObjectDelete("SIG3"); ObjectDelete("SIG4"); ObjectDelete("SIG5"); ObjectDelete("SIG6"); ObjectDelete("SIG7"); ObjectDelete("SIG8"); ObjectDelete("SIG9"); ObjectDelete("SIG10"); ObjectDelete("SIG11"); ObjectDelete("SIG12"); ObjectDelete("SIG13"); ObjectDelete("SIG14"); ObjectDelete("SIG15"); ObjectDelete("SIG16"); ObjectDelete("SIG17"); ObjectDelete("RSIData6");ObjectDelete("RSIData7");ObjectDelete("RSIData8");ObjectDelete("RSIData9"); ObjectDelete("RSIData10");ObjectDelete("RSIData11");ObjectDelete("RSIData12");ObjectDelete("RSIData13"); ObjectDelete("RSIData14"); ObjectDelete("weak"); ObjectDelete("weak1");ObjectDelete("Wweak1");ObjectDelete("Wweak"); ObjectDelete("0weak");ObjectDelete("0weak1");ObjectDelete("1weak");ObjectDelete("2weak1"); ObjectDelete("3weak");ObjectDelete("4weak1");ObjectDelete("5weak");ObjectDelete("6weak1"); ObjectDelete("7weak");ObjectDelete("8weak1");ObjectDelete("Mweak");ObjectDelete("Mweak1"); ObjectDelete("strong");ObjectDelete("strong1");ObjectDelete("1strong");ObjectDelete("2strong1"); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); //---- 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); 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_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_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); 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_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_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_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_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); string macd_h1= "", macd_m5= "", Dmacd_h1= "", Dmacd_m5= "", WAIT= "", NEU= "", WEAK= "" , WEAK2= "", STRG= "", STRG2= "", signal_m1= "", SIGNAL_m1= "", signal_m5= "", SIGNAL_m5= "", signal_h4= "", SIGNAL_h4= "", SIGNAL_h1= "", signal_h1= "", SIGNAL_m15= "", signal_m15= "", entry_m1= "", ENTRY_m1= "", signal_m30= "", SIGNAL_m30= "", MED= "" , med= "", MED1= "", med1= "", med2= "", MED2= "", MED3= "", med3= "", STRG3= "",STRG4= "", STRG5= "", STRG6= "", STRG7= "", STRG8= "", WEAK3= "", WEAK4= "",SIGNAL_d1= "", signal_d1= "", SIGNAL_w1= "", signal_w1= "",SIGNAL_mn1= "", signal_mn1= ""; // UP Data if ((macd_M5 > macd_MM5) && (macd_M1 > macd_MM1)) {macd_m5= "TREND/UP"; } //Down Data if ((macd_M5 < macd_MM5) && (macd_M1 < macd_MM1)) {Dmacd_m5= "TREND/DN"; } //Consolidation Data if ((macd_M5 < macd_MM5) && (macd_M1 > macd_MM1)) {WAIT= "NEUTRAL"; } if ((macd_M5 > macd_MM5) && (macd_M1 < macd_MM1)) {NEU= "NEUTRAL"; } if ((macd_M15 < macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 > macd_HH1)&& (macd_H4 < macd_HH4)) {WEAK= "WEAK"; } if ((macd_M15 > macd_MM15) && (macd_M30 < macd_MM30) && (macd_H1 < macd_HH1)&& (macd_H4 > macd_HH4)) {WEAK= "WEAK"; } if ((macd_M15 < macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 < macd_HH1) && (macd_H4 < macd_HH4)){WEAK= "MEDIUM"; } if ((macd_M15 > macd_MM15) && (macd_M30 < macd_MM30) && (macd_H1 > macd_HH1) && (macd_H4 > macd_HH4)) {WEAK2= "MEDIUM"; } if ((macd_M5 > macd_MM5) && (macd_M15 > macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 < macd_HH1) && (macd_H4 > macd_HH4)) {WEAK3= "MEDIUM"; } if ((macd_M5 < macd_MM5) && (macd_M15 < macd_MM15) && (macd_M30 < macd_MM30) && (macd_H1 >macd_HH1) && (macd_H4 < macd_HH4)) {WEAK4= "MEDIUM"; } if ((macd_M15 < macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 > macd_HH1)){MED= "TREND/UP"; } if ((macd_M15 > macd_MM15) && (macd_M30 < macd_MM30) && (macd_H1 < macd_HH1)) {med= "TREND/DN"; } if ((macd_M15 < macd_MM15) && (macd_M30 < macd_MM30) && (macd_H1 > macd_HH1)){MED2= "TREND/DN"; } if ((macd_M15 > macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 < macd_HH1)) {med2= "TREND/UP"; } if ((macd_M15 < macd_MM15) && (macd_M30 > macd_MM30) && (macd_H1 < macd_HH1)){MED3= "TREND/DN"; } if ((macd_M15 > macd_MM15) && (macd_M30 < macd_MM30) && (macd_H1 > macd_HH1)) {med3= "TREND/UP"; } if ((macd_M5 < macd_MM5) && (macd_M15 < macd_MM15) && (macd_H1 > macd_HH1) && (macd_H4 > macd_HH4)){MED1= "WEAK"; } if ((macd_M5 > macd_MM5) && (macd_M15 > macd_MM15) && (macd_H1 < macd_HH1) && (macd_H4 < macd_HH4)){med1= "WEAK"; } if ((macd_M15 > macd_MM15) && (macd_H1 > macd_HH1) && (macd_M30 > macd_MM30) && (macd_H4 < macd_HH4)) {STRG= "MEDIUM"; } if ((macd_M15 < macd_MM15) && (macd_H1 < macd_HH1) && (macd_M30 < macd_MM30) && (macd_H4 > macd_HH4)) {STRG2= "MEDIUM"; } if ((macd_M15 > macd_MM15) && (macd_H1 > macd_HH1) && (macd_M30 > macd_MM30) && (macd_H4 > macd_HH4)) {STRG3= "STRONG"; } if ((macd_M15 < macd_MM15) && (macd_H1 < macd_HH1) && (macd_M30 < macd_MM30) && (macd_H4 < macd_HH4)) {STRG4= "STRONG"; } if ((macd_M15 > macd_MM15) && (macd_H1 > macd_HH1) && (macd_M30 > macd_MM30) && (macd_H4 > macd_HH4)) {STRG5= "TREND/UP"; } if ((macd_M15 < macd_MM15) && (macd_H1 < macd_HH1) && (macd_M30 < macd_MM30) && (macd_H4 < macd_HH4)) {STRG6= "TREND/DN"; } if ((macd_M15 > macd_MM15) && (macd_H1 > macd_HH1) && (macd_M30 > macd_MM30) && (macd_H4 < macd_HH4)) {STRG7= "TREND/UP"; } if ((macd_M15 < macd_MM15) && (macd_H1 < macd_HH1) && (macd_M30 < macd_MM30) && (macd_H4 > macd_HH4)) {STRG8= "TREND/DN"; } //MACD Direction if ((macd_M1 > macd_MM1)) {signal_m1= "M1"; } if ((macd_M1 < macd_MM1)) {SIGNAL_m1= "M1"; } if ((macd_M5 > macd_MM5)) {signal_m5= "M5"; } if ((macd_M5 < macd_MM5)) {SIGNAL_m5= "M5"; } if ((macd_M15 > macd_MM15)) {signal_m15= "M15"; } if ((macd_M15 < macd_MM15)) {SIGNAL_m15= "M15"; } if ((macd_M30 > macd_MM30)) {signal_m30= "M30"; } if ((macd_M30 < macd_MM30)) {SIGNAL_m30= "M30"; } if ((macd_H1 > macd_HH1)) {signal_h1= "H1"; } if ((macd_H1 < macd_HH1)) {SIGNAL_h1= "H1"; } if ((macd_H4 > macd_HH4)) {signal_h4= "H4"; } if ((macd_H4 < macd_HH4)) {SIGNAL_h4= "H4"; } if ((macd_D1 > macd_DD1)) {signal_d1= "D1"; } if ((macd_D1 < macd_DD1)) {SIGNAL_d1= "D1"; } if ((macd_W1 > macd_WW1)) {signal_w1= "W1"; } if ((macd_W1 < macd_WW1)) {SIGNAL_w1= "W1"; } if ((macd_MN1 > macd_MMN1)) {signal_mn1= "MN1"; } if ((macd_MN1 < macd_MMN1)) {SIGNAL_mn1= "MN1"; } //MACD Direction ObjectCreate("SIG", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//M1 SIGNAL ObjectSetText("SIG",StringSubstr(signal_m1,0),9, "Arial Bold", Lime); ObjectSet("SIG", OBJPROP_CORNER, 0); ObjectSet("SIG", OBJPROP_XDISTANCE, 150); ObjectSet("SIG", OBJPROP_YDISTANCE, 2); ObjectCreate("SIG1", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//M1 SIGNAL ObjectSetText("SIG1",StringSubstr(SIGNAL_m1,0),9, "Arial Bold", Red); ObjectSet("SIG1", OBJPROP_CORNER, 0); ObjectSet("SIG1", OBJPROP_XDISTANCE, 150); ObjectSet("SIG1", OBJPROP_YDISTANCE, 2); ObjectCreate("SIG2", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//M5 SIGNAL ObjectSetText("SIG2",StringSubstr(signal_m5,0),9, "Arial Bold", Lime); ObjectSet("SIG2", OBJPROP_CORNER, 0); ObjectSet("SIG2", OBJPROP_XDISTANCE, 175); ObjectSet("SIG2", OBJPROP_YDISTANCE, 2); ObjectCreate("SIG3", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//M5 SIGNAL ObjectSetText("SIG3",StringSubstr(SIGNAL_m5,0),9, "Arial Bold", Red); ObjectSet("SIG3", OBJPROP_CORNER, 0); ObjectSet("SIG3", OBJPROP_XDISTANCE, 175); ObjectSet("SIG3", OBJPROP_YDISTANCE, 2); ObjectCreate("SIG4", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//M15 SIGNAL ObjectSetText("SIG4",StringSubstr(signal_m15,0),9, "Arial Bold", Lime); ObjectSet("SIG4", OBJPROP_CORNER, 0); ObjectSet("SIG4", OBJPROP_XDISTANCE, 370); ObjectSet("SIG4", OBJPROP_YDISTANCE, 2); ObjectCreate("SIG5", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//M15 SIGNAL ObjectSetText("SIG5",StringSubstr(SIGNAL_m15,0),9, "Arial Bold", Red); ObjectSet("SIG5", OBJPROP_CORNER, 0); ObjectSet("SIG5", OBJPROP_XDISTANCE, 370); ObjectSet("SIG5", OBJPROP_YDISTANCE, 2); ObjectCreate("SIG6", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//M30 SIGNAL ObjectSetText("SIG6",StringSubstr(signal_m30,0),9, "Arial Bold", Lime); ObjectSet("SIG6", OBJPROP_CORNER, 0); ObjectSet("SIG6", OBJPROP_XDISTANCE, 400); ObjectSet("SIG6", OBJPROP_YDISTANCE, 2); ObjectCreate("SIG7", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//M30 SIGNAL ObjectSetText("SIG7",StringSubstr(SIGNAL_m30,0),9, "Arial Bold", Red); ObjectSet("SIG7", OBJPROP_CORNER, 0); ObjectSet("SIG7", OBJPROP_XDISTANCE, 400); ObjectSet("SIG7", OBJPROP_YDISTANCE, 2); ObjectCreate("SIG8", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//H1 SIGNAL ObjectSetText("SIG8",StringSubstr(signal_h1,0),9, "Arial Bold", Lime); ObjectSet("SIG8", OBJPROP_CORNER, 0); ObjectSet("SIG8", OBJPROP_XDISTANCE, 430); ObjectSet("SIG8", OBJPROP_YDISTANCE, 2); ObjectCreate("SIG9", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//H1 SIGNAL ObjectSetText("SIG9",StringSubstr(SIGNAL_h1,0),9, "Arial Bold", Red); ObjectSet("SIG9", OBJPROP_CORNER, 0); ObjectSet("SIG9", OBJPROP_XDISTANCE, 430); ObjectSet("SIG9", OBJPROP_YDISTANCE, 2); ObjectCreate("SIG10", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//H4 SIGNAL ObjectSetText("SIG10",StringSubstr(signal_h4,0),9, "Arial Bold", Lime); ObjectSet("SIG10", OBJPROP_CORNER, 0); ObjectSet("SIG10", OBJPROP_XDISTANCE, 450); ObjectSet("SIG10", OBJPROP_YDISTANCE, 2); ObjectCreate("SIG11", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//H4 SIGNAL ObjectSetText("SIG11",StringSubstr(SIGNAL_h4,0),9, "Arial Bold", Red); ObjectSet("SIG11", OBJPROP_CORNER, 0); ObjectSet("SIG11", OBJPROP_XDISTANCE, 450); ObjectSet("SIG11", OBJPROP_YDISTANCE, 2); ObjectCreate("SIG12", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//D1 SIGNAL ObjectSetText("SIG12",StringSubstr(signal_d1,0),9, "Arial Bold", Lime); ObjectSet("SIG12", OBJPROP_CORNER, 0); ObjectSet("SIG12", OBJPROP_XDISTANCE, 750); ObjectSet("SIG12", OBJPROP_YDISTANCE, 2); if (Show_MAJOR_TREND ==true) { ObjectCreate("SIG13", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//D1 SIGNAL ObjectSetText("SIG13",StringSubstr(SIGNAL_d1,0),9, "Arial Bold", Red); ObjectSet("SIG13", OBJPROP_CORNER, 0); ObjectSet("SIG13", OBJPROP_XDISTANCE, 750); ObjectSet("SIG13", OBJPROP_YDISTANCE, 2); ObjectCreate("SIG14", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//W1 SIGNAL ObjectSetText("SIG14",StringSubstr(signal_w1,0),9, "Arial Bold", Lime); ObjectSet("SIG14", OBJPROP_CORNER, 0); ObjectSet("SIG14", OBJPROP_XDISTANCE, 770); ObjectSet("SIG14", OBJPROP_YDISTANCE, 2); ObjectCreate("SIG15", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//W1 SIGNAL ObjectSetText("SIG15",StringSubstr(SIGNAL_w1,0),9, "Arial Bold", Red); ObjectSet("SIG15", OBJPROP_CORNER, 0); ObjectSet("SIG15", OBJPROP_XDISTANCE, 770); ObjectSet("SIG15", OBJPROP_YDISTANCE, 2); ObjectCreate("SIG16", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//MN1 SIGNAL ObjectSetText("SIG16",StringSubstr(signal_mn1,0),9, "Arial Bold", Lime); ObjectSet("SIG16", OBJPROP_CORNER, 0); ObjectSet("SIG16", OBJPROP_XDISTANCE, 795); ObjectSet("SIG16", OBJPROP_YDISTANCE, 2); ObjectCreate("SIG17", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//MN1 SIGNAL ObjectSetText("SIG17",StringSubstr(SIGNAL_mn1,0),9, "Arial Bold", Red); ObjectSet("SIG17", OBJPROP_CORNER, 0); ObjectSet("SIG17", OBJPROP_XDISTANCE, 795); ObjectSet("SIG17", OBJPROP_YDISTANCE, 2); } ObjectCreate("RSIData6", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//TREND UP ObjectSetText("RSIData6",StringSubstr(macd_h1,0),12, "Arial Bold", MediumSeaGreen); ObjectSet("RSIData6", OBJPROP_CORNER, 0); ObjectSet("RSIData6", OBJPROP_XDISTANCE, 565); ObjectSet("RSIData6", OBJPROP_YDISTANCE, 2); ObjectCreate("RSIData7", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//TREND DOWN ObjectSetText("RSIData7",StringSubstr(Dmacd_h1,0),12, "Arial Bold", Tomato); ObjectSet("RSIData7", OBJPROP_CORNER, 0); ObjectSet("RSIData7", OBJPROP_XDISTANCE, 565); ObjectSet("RSIData7", OBJPROP_YDISTANCE, 2); //M1 & M5 TREND Data ObjectCreate("RSIData8", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//M1 & M5 TREND UP ObjectSetText("RSIData8",StringSubstr(macd_m5,0),12, "Arial Bold", Lime); ObjectSet("RSIData8", OBJPROP_CORNER, 0); ObjectSet("RSIData8", OBJPROP_XDISTANCE, 200); ObjectSet("RSIData8", OBJPROP_YDISTANCE, 2); ObjectCreate("RSIData9", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//M1 & M5 TREND DOWN ObjectSetText("RSIData9",StringSubstr(Dmacd_m5,0),12, "Arial Bold", Red); ObjectSet("RSIData9", OBJPROP_CORNER, 0); ObjectSet("RSIData9", OBJPROP_XDISTANCE, 200); ObjectSet("RSIData9", OBJPROP_YDISTANCE, 2); //M1 & M5 NEUTRAL Data ObjectCreate("RSIData10", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//M1 & M5 NEUTRAL ObjectSetText("RSIData10",StringSubstr(WAIT,0),12, "Arial Bold", C'255,128,0'); ObjectSet("RSIData10", OBJPROP_CORNER, 0); ObjectSet("RSIData10", OBJPROP_XDISTANCE, 200); ObjectSet("RSIData10", OBJPROP_YDISTANCE, 2); ObjectCreate("RSIData11", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//M1 & M5 NEUTRAL ObjectSetText("RSIData11",StringSubstr(NEU,0),12, "Arial Bold", C'255,128,0'); ObjectSet("RSIData11", OBJPROP_CORNER, 0); ObjectSet("RSIData11", OBJPROP_XDISTANCE, 200); ObjectSet("RSIData11", OBJPROP_YDISTANCE, 2); //Trend Labels ObjectCreate("RSIData12", OBJ_LABEL, WindowFind("GMACD"), 0, 0); ObjectSetText("RSIData12","SIGNAL",8, "Arial Bold", Silver); ObjectSet("RSIData12", OBJPROP_CORNER, 0); ObjectSet("RSIData12", OBJPROP_XDISTANCE, 105); ObjectSet("RSIData12", OBJPROP_YDISTANCE, 2); ObjectCreate("RSIData13", OBJ_LABEL, WindowFind("GMACD"), 0, 0); ObjectSetText("RSIData13","MAIN TREND", 8, "Arial Bold", Silver); ObjectSet("RSIData13", OBJPROP_CORNER, 0); ObjectSet("RSIData13", OBJPROP_XDISTANCE, 300); ObjectSet("RSIData13", OBJPROP_YDISTANCE, 2); if (Show_MAJOR_TREND ==true) { ObjectCreate("RSIData14", OBJ_LABEL, WindowFind("GMACD"), 0, 0); ObjectSetText("RSIData14","MAJOR TREND", 8, "Arial Bold", Silver); ObjectSet("RSIData14", OBJPROP_CORNER, 0); ObjectSet("RSIData14", OBJPROP_XDISTANCE, 660); ObjectSet("RSIData14", OBJPROP_YDISTANCE, 2); } //Weak Strong ObjectCreate("weak", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//WEAK ObjectSetText("weak",StringSubstr(WEAK,0),8, "Arial Bold", Orange); ObjectSet("weak", OBJPROP_CORNER, 0); ObjectSet("weak", OBJPROP_XDISTANCE, 565); ObjectSet("weak", OBJPROP_YDISTANCE, 2); ObjectCreate("weak1", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//WEAK ObjectSetText("weak1",StringSubstr(WEAK2,0),8, "Arial Bold", Orange); ObjectSet("weak1", OBJPROP_CORNER, 0); ObjectSet("weak1", OBJPROP_XDISTANCE, 565); ObjectSet("weak1", OBJPROP_YDISTANCE, 2); //Weak Strong ObjectCreate("Wweak", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//WEAK ObjectSetText("Wweak",StringSubstr(WEAK3,0),8, "Arial Bold", Orange); ObjectSet("Wweak", OBJPROP_CORNER, 0); ObjectSet("Wweak", OBJPROP_XDISTANCE, 565); ObjectSet("Wweak", OBJPROP_YDISTANCE, 2); ObjectCreate("Wweak1", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//WEAK ObjectSetText("Wweak1",StringSubstr(WEAK4,0),8, "Arial Bold", Orange); ObjectSet("Wweak1", OBJPROP_CORNER, 0); ObjectSet("Wweak1", OBJPROP_XDISTANCE, 565); ObjectSet("Wweak1", OBJPROP_YDISTANCE, 2); ObjectCreate("0weak", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//Medium ObjectSetText("0weak",StringSubstr(MED,0),12, "Arial Bold",MediumSeaGreen ); ObjectSet("0weak", OBJPROP_CORNER, 0); ObjectSet("0weak", OBJPROP_XDISTANCE, 475); ObjectSet("0weak", OBJPROP_YDISTANCE, 2); ObjectCreate("0weak1", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//Medium ObjectSetText("0weak1",StringSubstr(med,0),12, "Arial Bold",Tomato ); ObjectSet("0weak1", OBJPROP_CORNER, 0); ObjectSet("0weak1", OBJPROP_XDISTANCE, 475); ObjectSet("0weak1", OBJPROP_YDISTANCE, 2); //TREND ObjectCreate("1weak", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//TREND/DN ObjectSetText("1weak",StringSubstr(MED2,0),12, "Arial Bold", Tomato); ObjectSet("1weak", OBJPROP_CORNER, 0); ObjectSet("1weak", OBJPROP_XDISTANCE, 475); ObjectSet("1weak", OBJPROP_YDISTANCE, 2); ObjectCreate("2weak1", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//TREND/UP ObjectSetText("2weak1",StringSubstr(med2,0),12, "Arial Bold", MediumSeaGreen); ObjectSet("2weak1", OBJPROP_CORNER, 0); ObjectSet("2weak1", OBJPROP_XDISTANCE, 475); ObjectSet("2weak1", OBJPROP_YDISTANCE, 2); ObjectCreate("3weak", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//TREND/DN ObjectSetText("3weak",StringSubstr(MED3,0),12, "Arial Bold", Red); ObjectSet("3weak", OBJPROP_CORNER, 0); ObjectSet("3weak", OBJPROP_XDISTANCE, 475); ObjectSet("3weak", OBJPROP_YDISTANCE, 2); ObjectCreate("4weak1", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//TREND/UP ObjectSetText("4weak1",StringSubstr(med3,0),12, "Arial Bold", Lime); ObjectSet("4weak1", OBJPROP_CORNER, 0); ObjectSet("4weak1", OBJPROP_XDISTANCE, 475); ObjectSet("4weak1", OBJPROP_YDISTANCE, 2); ObjectCreate("5weak", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//TREND/UP ObjectSetText("5weak",StringSubstr(STRG5,0),12, "Arial Bold", Lime); ObjectSet("5weak", OBJPROP_CORNER, 0); ObjectSet("5weak", OBJPROP_XDISTANCE, 475); ObjectSet("5weak", OBJPROP_YDISTANCE, 2); ObjectCreate("6weak1", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//TREND/DN ObjectSetText("6weak1",StringSubstr(STRG6,0),12, "Arial Bold", Red); ObjectSet("6weak1", OBJPROP_CORNER, 0); ObjectSet("6weak1", OBJPROP_XDISTANCE, 475); ObjectSet("6weak1", OBJPROP_YDISTANCE, 2); ObjectCreate("7weak", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//TREND/UP ObjectSetText("7weak",StringSubstr(STRG7,0),12, "Arial Bold", Lime); ObjectSet("7weak", OBJPROP_CORNER, 0); ObjectSet("7weak", OBJPROP_XDISTANCE, 475); ObjectSet("7weak", OBJPROP_YDISTANCE, 2); ObjectCreate("8weak1", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//TREND/DN ObjectSetText("8weak1",StringSubstr(STRG8,0),12, "Arial Bold", Red); ObjectSet("8weak1", OBJPROP_CORNER, 0); ObjectSet("8weak1", OBJPROP_XDISTANCE, 475); ObjectSet("8weak1", OBJPROP_YDISTANCE, 2); //Reverse? ObjectCreate("Mweak", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//WEAK ObjectSetText("Mweak",StringSubstr(MED1,0),8, "Arial Bold", Orange); ObjectSet("Mweak", OBJPROP_CORNER, 0); ObjectSet("Mweak", OBJPROP_XDISTANCE, 565); ObjectSet("Mweak", OBJPROP_YDISTANCE, 2); ObjectCreate("Mweak1", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//WEAK ObjectSetText("Mweak1",StringSubstr(med1,0),8, "Arial Bold", Orange); ObjectSet("Mweak1", OBJPROP_CORNER, 0); ObjectSet("Mweak1", OBJPROP_XDISTANCE, 565); ObjectSet("Mweak1", OBJPROP_YDISTANCE, 2); ObjectCreate("strong", OBJ_LABEL, WindowFind("GMACD"), 0, 0); ObjectSetText("strong",StringSubstr(STRG,0),8, "Arial Bold",Orange ); ObjectSet("strong", OBJPROP_CORNER, 0); ObjectSet("strong", OBJPROP_XDISTANCE, 565); ObjectSet("strong", OBJPROP_YDISTANCE, 2); ObjectCreate("strong1", OBJ_LABEL, WindowFind("GMACD"), 0, 0); ObjectSetText("strong1",StringSubstr(STRG2,0),8, "Arial Bold", Orange); ObjectSet("strong1", OBJPROP_CORNER, 0); ObjectSet("strong1", OBJPROP_XDISTANCE, 565); ObjectSet("strong1", OBJPROP_YDISTANCE, 2); ObjectCreate("1strong", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//STRONG ObjectSetText("1strong",StringSubstr(STRG3,0),8, "Arial Bold", Yellow); ObjectSet("1strong", OBJPROP_CORNER, 0); ObjectSet("1strong", OBJPROP_XDISTANCE, 565); ObjectSet("1strong", OBJPROP_YDISTANCE, 2); ObjectCreate("2strong1", OBJ_LABEL, WindowFind("GMACD"), 0, 0);//STRONG ObjectSetText("2strong1",StringSubstr(STRG4,0),8, "Arial Bold", Yellow); ObjectSet("2strong1", OBJPROP_CORNER, 0); ObjectSet("2strong1", OBJPROP_XDISTANCE, 565); ObjectSet("2strong1", OBJPROP_YDISTANCE, 2); } //---- return(0); //---- //+------------------------------------------------------------------+