DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
MACD:=2*(DIFF-DEA), COLORSTICK,LINETHICK2;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1) and macd<0);
底背离:REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS
(DIFF,DEA) and macd>0;
看股 吧公式 www.kangu ba.com
[源码翻译]通达信公式动态翻译显示
DIFF赋值:收盘价的12日指数移动平均-收盘价的26日指数移动平均
DEA赋值:DIFF的9日指数移动平均
MACD赋值:2*(DIFF-DEA), COLORSTICK,线宽为2
A1赋值:上次1日前的DIFF上穿DEAANDMACD<0距今天数
输出底背离:A1+1日前的收盘价>收盘价 AND DIFF>A1+1日前的DIFF AND DIFF上穿DEA AND MACD>0