[MT4指标]用不了了,请高手帮忙改改。谢谢
MT4升级后用不了了,请高手帮忙改改。另外再加上显示箭头。
//+------------------------------------------------------------------+
//| 12.mq4 |
//| 赵玉旗 2010年4月22日. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "赵玉旗 2010年4月22日."
#property link "http://www.metaquotes.net"
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
#property indicator_chart_window
extern int MACD=0;
extern int fastEMA=11;
extern int slowEMA=12;
extern int singalSMA=11;
int mark=0;
int start()
{
if( // iHigh(0,0,0) >= iMA(0,0,警戒均线,0,MODE_SMA,PRICE_CLOSE,0)
iMACD(NULL,0,12,26,9,PRICE_HIGH,MODE_MAIN,0)>iMACD(NULL,0,12,26,9,PRICE_HIGH,MODE_MAIN,1)
&&iMACD(NULL,0,12,26,9,PRICE_HIGH,MODE_MAIN,0)>0
&&iMACD(NULL,0,12,26,9,PRICE_HIGH,MODE_MAIN,1)<0
//&& iHigh(0,0,1) < iMA(0,0,警戒均线,0,MODE_SMA,PRICE_CLOSE,1)
&& mark!= 1)
{
Alert(Symbol(),Period(),"分 ", "MACD 向上穿0轴"," at ", Close[0]," - ",
TimeToStr(CurTime(),TIME_SECONDS));
mark = 1;
}
if( iMACD(NULL,0,12,26,9,PRICE_HIGH,MODE_MAIN,0)0
// iLow(0,0,0) <= iMA(0,0,警戒均线,0,MODE_SMA,PRICE_CLOSE,0)
// && iLow(0,0,1) > iMA(0,0,警戒均线,0,MODE_SMA,PRICE_CLOSE,1)
&& mark != 2 )
{
Alert(Symbol(),Period(),"分 ", "MACD 向下穿0轴"," at ", Close[0]," - ",
TimeToStr(CurTime(),TIME_SECONDS) );
mark = 2;
}
return(0);
}
//+------------------------------------------------------------------+