A:=MACD.DIF;
A1:=macd.DEA;
A2:=MACD.MACD;
T:=BARSLAST(A<0 AND A1<0 AND CROSS(A,A1));
TJ:=EVERY(A2>0,3) AND A2>REF(A2,1) AND REF(A2,1)<REF(A2,2) AND A>0 AND A1>0 and a2>0;
XG:COUNT(TJ,T)=1 AND TJ;
九毛八公式解读
A赋值:平滑异同平均的DIF A1赋值:平滑异同平均的DEA A2赋值:平滑异同平均的MACD T赋值:上次A<0ANDA1<0ANDCROSS(A,A1)距今天数 TJ赋值:最近3日一直存在A2>0 AND A2>1日前的A2 AND 1日前的A2<2日前的A2 AND A>0 AND A1>0 AND A2>0 输出XG:统计T日中满足TJ的天数=1 AND TJ