通达信MACD低位金叉 高位死叉副图源码
DIFF:EMA(CLOSE,12)-EMA(CLOSE,27);
DEA:EMA(DIFF,9);
MACD:2*(DIFF-DEA), COLORSTICK,LINETHICK2;
高位死叉:=CROSS(DEA,DIFF) AND DIFF>0.25;
STICKLINE(高位死叉,0,0.08,6,0),COLORYELLOW;
DRAWTEXT(高位死叉,0.16,' 高位死叉'),COLORWHITE;
JCCOUNT:=COUNT(CROSS(DEA,DIFF),BARSLAST(DIFF<=0));COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次死叉:=CROSS(DEA,DIFF) AND DIFF>0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次死叉,0,0.06,6,0),COLORFF00FF;
DRAWICON(二次死叉,DIFF*0.9,1) ;
DRAWTEXT(二次死叉,0.2,' 二次死叉'),COLORYELLOW;
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
STICKLINE(低位金叉,0,0.08,6,0),COLORYELLOW;
DRAWTEXT(低位金叉,0.16,' 低位金叉'),COLORWHITE;
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
STICKLINE(二次金叉,0,0.06,6,0),COLORFF00FF;
DRAWICON(二次金叉,DEA*0.9,1) ;
DRAWTEXT(二次金叉,0.2,' 二次金叉'),COLORYELLOW;
- 上一篇公式:周线每次KDJ金叉 当日K线最高点处向右划五个交易日水平线
- 下一篇公式:通达信重上五线主图源码 选股