//+------------------------------------------------------------------+ //| signal lubang kosong.mq4 | //| reza rahmad | //| reiz_gamer@yahoo.co.id | //+------------------------------------------------------------------+ #property copyright "reza rahmad" #property link "reiz_gamer@yahoo.co.id" #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Blue #property indicator_color2 Red #property indicator_color3 Red #property indicator_width1 3 #property indicator_width2 3 extern int fastrsi=3; extern int slowrsi=13; extern int kperiod=8; extern int dperiod=3; extern int slowingstoch=3; extern int FastEMA = 12;//启始买点 extern int SlowEMA = 26;//启始买点 extern int SignalSMA = 9;//启始买点 extern int ARROWWIDTH = 3; extern double poin =15; extern bool arrowmacd = true; double buy[]; double sell[]; double m; double harga1[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { int y = 0; for(int x=1;x<3;x++) for( y=0;y= 0; i --) { Macd0 = iMACD(NULL , 0 , FastEMA , SlowEMA ,SignalSMA , PRICE_CLOSE , MODE_MAIN , i); Macd1 = iMACD(NULL , 0 , FastEMA , SlowEMA ,SignalSMA , PRICE_CLOSE , MODE_MAIN , i+1); buy [i] = 0; sell [i] = 0; if (Macd0 > 0 && Macd1 < 0) { macd = 1; if (arrowmacd==true) { buy [i] = Low [i] - 5 * Point; if (Period () >= PERIOD_M30) buy [i] -= 8 * Point; if (Period () >= PERIOD_H1) buy [i] -= 8 * Point; if (Period () >= PERIOD_H4) buy [i] -= 8 * Point; if (Period () >= PERIOD_D1) buy [i] -= 8 * Point; if (Period () >= PERIOD_W1) buy [i] -= 12 * Point; if (Period () >= PERIOD_MN1) buy [i] -= 60 * Point; } } if (Macd0 < 0 && Macd1 > 0) { macd = 2; if (arrowmacd==true){ sell [i] = High [i] + 5 * Point; if (Period () >= PERIOD_M30) sell [i] += 8 * Point; if (Period () >= PERIOD_H1) sell [i] += 8 * Point; if (Period () >= PERIOD_H4) sell [i] += 8 * Point; if (Period () >= PERIOD_D1) sell [i] += 8 * Point; if (Period () >= PERIOD_W1) sell [i] += 12 * Point; if (Period () >= PERIOD_MN1) sell [i] += 60 * Point; } } } int r,s; //stoch if(iStochastic(NULL,0,kperiod,dperiod,slowingstoch,MODE_SMA,0,MODE_MAIN,0)>80 ||iStochastic (NULL,0,kperiod,dperiod,slowingstoch,MODE_SMA,0,MODE_MAIN,0)<20 ) { ObjectSetText("trade","OVERBOUGHT!,berubah arah take profit",11,"Tahoma",Tomato); } else { ObjectSetText("trade","Kondisi Masih Bagus",11,"Tahoma",Green); } if(iStochastic(NULL,0,kperiod,dperiod,slowingstoch,MODE_SMA,0,MODE_MAIN,0)>iStochastic(NULL,0,kperiod,dperiod,slowingstoch,MODE_SMA,0,MODE_SIGNAL,0)) { ObjectSetText("signal20",CharToStr(221),20,"Wingdings",Green); s = 1; } else { ObjectSetText("signal20",CharToStr(222),20,"Wingdings",Tomato); s = 2; } //rsi if(iRSI(NULL,0,fastrsi,PRICE_CLOSE,0)>iRSI(NULL,0,slowrsi,PRICE_CLOSE,1)) { ObjectSetText("signal21",CharToStr(221),20,"Wingdings",Green); r = 1; } else { ObjectSetText("signal21",CharToStr(222),20,"Wingdings",Tomato); r = 2 ; } // kode buy dan sell if (r ==1 && s == 1 && macd == 1) { ObjectSetText("signal10",CharToStr(67),40,"Wingdings",Green); ObjectSetText("signal","BUY KUAT",20,"TAHOMA",Green); } if (r ==1 && s == 1 && macd == 2) { ObjectSetText("signal10",CharToStr(67),40,"Wingdings",Green); ObjectSetText("signal","BUY ",20,"TAHOMA",Green); } if (r == 2 && s == 2 && macd == 2) { ObjectSetText("signal10",CharToStr(68),40,"Wingdings",Tomato); ObjectSetText("signal","SELL KUAT",20,"TAHOMA",Tomato); } if (r == 2 && s == 2 && macd == 1) { ObjectSetText("signal10",CharToStr(68),40,"Wingdings",Tomato); ObjectSetText("signal","SELL ",20,"TAHOMA",Tomato); } if (r == 2 && s == 1) { ObjectSetText("signal10",CharToStr(73),40,"Wingdings",Tomato); ObjectSetText("signal","TAHAN",20,"TAHOMA",Magenta); } if (r == 1 && s == 2) { ObjectSetText("signal10",CharToStr(73),40,"Wingdings",Tomato); ObjectSetText("signal","TAHAN",20,"TAHOMA",Magenta); } return(0); } //+------------------------------------------------------------------+