DIFF:=EMA(DCLOSE,12)-EMA(DCLOSE,26);
DEA:=EMA(DIFF,9),COLORFFFF00;
A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));
底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);
{看股吧-股票公式网站 www.kanguba.com}
DEA0:=EMA(DIFF*100,9);
MACD0:=2*(DIFF*100-DEA0);
黑马:=(MACD0>REF(MACD0,1)*2.5 AND MACD0>15);
底背离 AND 黑马;
看股吧 公式 www.kanguba .com
[源码翻译]通达信公式动态翻译显示
DIFF赋值:不定周期收盘价的12日指数移动平均-不定周期收盘价的26日指数移动平均
DEA赋值:DIFF的9日指数移动平均,COLORFFFF00
A1赋值:上次1日前的DIFF上穿DEA距今天数
底背离赋值:A1+1日前的收盘价>收盘价 AND DIFF>A1+1日前的DIFF AND DIFF上穿DEA