编写要求:
macd底背离后macd值翻红选股公式
公式在线网解答:
DIFF:=EMA(CLOSE,12)-EMA(CLOSE,27);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
xg:count(底背离,10)>=1 and cross(macd,0);