//计算macd
DIF=(EMA(CLOSE,12)-EMA(CLOSE,26))*100; //求DIF
DEA=EMA(DIF,9); //求DEA
MacDA = (DIF-DEA)*2;
MACddiF= MACDA – REF(MACDA ,1);
EMAMACDDIF: EMA(MACDDIF,3),COLORSTICK;
MACD=(DIF-DEA)*2; //求MACD并显示量柱
MACD1 = REF(MACD,1);
MACD2 = REF(MACD,2);
MACD3 = REF(MACD,3);
MACD_OLD2 = (MACD1+MACD2)/2;
MACD_OLD3 = (MACD1+MACD2+MACD3)/3;
BUYIN= (MACD<0) AND (crOSS(MACD,MACD_OLD3)) ;
SALEOUT= (MACD>0) AND (CROSS(MACD1,MACD)) ;
DRAWICON( BUYIN AND NOT(REF(BUYIN,1)),0,1);
DRAWICON( SALEOUT AND NOT(REF(SALEOUT,1)),0,2);
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)