DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA);
FH1:=REF(macd,1)<REF(MACD,2) AND REF(MACD,2)<REF(MACD,3) AND REF(MACD,3)<REF(MACD,4);
FH2:=MACD>=0 AND COUNT(MACD>REF(MACD,1),1)=1;
FH3:=FH1 AND FH2 AND EMA(C,13)>REF(EMA(C,13),1);
FH4:=FH1 AND FH2 AND ABS((DIFF-DEA)/C)<0.018;
FH5:=FH1 AND FH2 AND MACD<0.10;
FH3 OR FH4 OR FH5;
九毛八公式解读
DIFF赋值:收盘价的12日指数移动平均-收盘价的26日指数移动平均 DEA赋值:DIFF的9日指数移动平均 MACD赋值:2*(DIFF-DEA) FH1赋值:1日前的MACD<2日前的MACD AND 2日前的MACD<3日前的MACD AND 3日前的MACD<4日前的MACD FH2赋值:MACD>=0 AND 统计1日中满足MACD>1日前的MACD的天数=1 FH3赋值:FH1 AND FH2 AND 收盘价的13日指数移动平均>1日前的收盘价的13日指数移动平均 FH4赋值:FH1 AND FH2 AND (DIFF-DEA)/收盘价的绝对值<0.018 FH5赋值:FH1 AND FH2 AND MACD<0.10 FH3 OR FH4 OR FH5