MACD:=("macd.DIF"-"MACD.DEA")*2*60;
JCCOUNT:=COUNT(CROSS("MACD.DIF","MACD.DEA"),BARSLAST("MACD.DEA">=0));
二次金叉:=CROSS("MACD.DIF","MACD.DEA") AND "MACD.DEA"<0 AND COUNT(JCCOUNT=2,21)=1;
A101:=BARSLAST(REF(CROSS("MACD.DIF","MACD.DEA"),1));
底背离:=REF(CLOSE,A101+1)>CLOSE AND "MACD.DIF">REF("MACD.DIF",A101+1) AND CROSS("MACD.DIF","MACD.DEA");
XG:二次金叉 AND 底背离;
九毛八公式解读
MACD赋值:("MACD.DIF"-"MACD.DEA")*2*60 JCCOUNT赋值:统计上次"MACD.DEA">=0距今天数日中满足"MACD.DIF"上穿"MACD.DEA"的天数 二次金叉赋值:"MACD.DIF"上穿"MACD.DEA" AND "MACD.DEA"<0 AND 统计21日中满足JCCOUNT=2的天数=1 A101赋值:上次1日前的"MACD.DIF"上穿"MACD.DEA"距今天数 底背离赋值:A101+1日前的收盘价>收盘价 AND "MACD.DIF">A101+1日前的"MACD.DIF" AND "MACD.DIF"上穿"MACD.DEA" 输出XG:二次金叉 AND 底背离