DIF:=MACD.DIF;
DEA:=MACD.DEA;
JCCOUNT:=COUNT(CROSS(DEA,DIF),BARSLAST(DEA<=0));
零上下叉:=CROSS(DEA,DIF) AND DIF>0.0 AND COUNT(JCCOUNT=1,21)=1;
T:=BARSLAST(零上下叉);
SS:=COUNT(CROSS(MACD>REF(MACD,1) AND DIF>0 AND DEA>0,0.5) AND DEA>DIF,T)=1 ;
XG:CROSS(SS,0.5);
编写条件:
MACD双线上零轴后第一次死叉出绿柱,绿柱开始缩短的选股公式。
编写方法:
DIF:=MACD.DIF;
DEA:=MACD.DEA;
JCCOUNT:=COUNT(CROSS(DEA,DIF),BARSLAST(DEA<=0));
零上下叉:=CROSS(DEA,DIF) AND DIF>0.0 AND COUNT(JCCOUNT=1,21)=1;
T:=BARSLAST(零上下叉);
SS:=COUNT(CROSS(MACD>REF(MACD,1) AND DIF>0 AND DEA>0,0.5) AND DEA>DIF,T)=1 ;
XG:CROSS(SS,0.5);