DIF:=EMA(C,12)-EMA(C,26);
DEA:=EMA(DIF,9);
MACD:=2*(DIF-DEA);
零下TJ2:=IF(CROSS(0,DEA),1,0);
DIF死叉:=IF(DIF>0 AND CROSS(DEA,DIF),1,0);
总死叉TJ:=IF(零下TJ2,SUM(DIF死叉,0),0);
最后死叉次:=HHV(总死叉TJ,0);
总死叉次:=SUM(DIF死叉,0);
轴上第1次死叉:=IF(总死叉次-最后死叉次=1 AND 总死叉次>REF(总死叉次,1),1,0);
死叉天:=IF(MACD<0 AND DIF>0,BARSLAST(轴上第1次死叉)+1,0);
轻装上阵:MACD>REF(MACD,1) AND REF(MACD<REF(MACD,1),1) AND BETWEEN(死叉天,1,15) AND REF(DIF>0 AND DIF<0.6,1);