DIFF:=EMA(CLOSE,12)-EMA(CLOSE,27);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;
JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));
二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
九毛八公式解读
DIFF赋值:收盘价的12日指数移动平均-收盘价的27日指数移动平均 DEA赋值:DIFF的9日指数移动平均 MACD赋值:2*(DIFF-DEA) 低位金叉赋值:DIFF上穿DEA AND DIFF<-0.1 JCCOUNT赋值:统计上次DEA>=0距今天数日中满足DIFF上穿DEA的天数 二次金叉赋值:DIFF上穿DEA AND DEA<0 AND 统计21日中满足JCCOUNT=2的天数=1 A1赋值:上次1日前的DIFF上穿DEA距今天数 A1+1日前的收盘价>收盘价 AND DIFF>A1+1日前的DIFF AND DIFF上穿DEA