MACD将死不死优化之选股指标公式

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);

DEA:=EMA(DIF,9);

macd:=(DIF-DEA)*2;

NH:=REF(DIF,3)>=REF(DIF,2) AND REF(DIF,2)>=REF(DIF,1) AND DIF>REF(DIF,1)*1.1;

NH1:=Abs((REF(DIF,1)-REF(DEA,1))/REF(DIF,1))<=0.2;

DT:=REF(DIF,2)>REF(DEA,2) AND REF(DIF,1)>=REF(DEA,1) AND DIF>DEA;

NLZ:=MacD>REF(MACD,1) AND DIF>0;

NLZ1:=MACD>REF(MACD,1) AND DIF<0;

将死不死1:=(NH1 AND NH AND DT AND NLZ);

将死不死0:=(NH1 AND NH AND DT AND NLZ1);

将死不死:将死不死1 OR 将死不死0;