A1A:=EMA(CLOSE,9);
A1B:=((A1A-EMA(CLOSE,5))<0);
A1D:=BARSLAST(A1B);
A21:=IF((A1D>0),(0-2),0);
(REF(A21,1)=(0-2)) AND (A21=0);
九毛八公式解读
A1A赋值:收盘价的9日指数移动平均 A1B赋值:((A1A-收盘价的5日指数移动平均)<0) A1D赋值:上次A1B距今天数 A21赋值:如果(A1D>0),返回(0-2),否则返回0 (1日前的A21=(0-2)) AND (A21=0)