以下是通达信带顶背离底背离画线的MACD副图指标源码(无源码的请下载附件导入)
指标使用了DRAWLINE函数,所有显示有未来函数。
低位金叉选股源码:
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,27);
DEA:=EMA(DIFF,9);
低位金叉:(CROSS(DIFF,DEA) AND DIFF<-0.1)*信号;
二次金叉选股源码:
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,27);
DEA:=EMA(DIFF,9);
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0))*信号;
二次金叉:(CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1)*信号;
2042511969.jpg
|