X_1:=MA(CLOSE,5);
X_2:=MA(CLOSE,13);
X_3:=MA(CLOSE,34);
X_5:=BARSLAST(CROSS(X_1,X_2));
X_6:=BARSLAST(CROSS(X_1,X_3));
X_7:=BARSLAST(CROSS(X_2,X_3));
X_8:=X_5>=X_6 AND X_6>X_7 AND X_5-X_7<20;
X_9:=COUNT(CROSS(X_1,X_2),X_5+1)=1 AND COUNT(CROSS(X_1,X_3),X_5+1)=1 AND CROSS(X_2,X_3) AND X_1>X_2 AND X_2>X_3;
X_10:=X_1>REF(X_1,1) AND X_2>REF(X_2,1) AND X_3<REF(X_3,1);
弱加仓:X_8 AND X_9 AND X_10;
九毛八公式解读
X_1赋值:收盘价的5日简单移动平均 X_2赋值:收盘价的13日简单移动平均 X_3赋值:收盘价的34日简单移动平均 X_5赋值:上次X_1上穿X_2距今天数 X_6赋值:上次X_1上穿X_3距今天数 X_7赋值:上次X_2上穿X_3距今天数 X_8赋值:X_5>=X_6 AND X_6>X_7 AND X_5-X_7<20 X_9赋值:统计X_5+1日中满足X_1上穿X_2的天数=1 AND 统计X_5+1日中满足X_1上穿X_3的天数=1 AND X_2上穿X_3 AND X_1>X_2 AND X_2>X_3 X_10赋值:X_1>1日前的X_1 AND X_2>1日前的X_2 AND X_3<1日前的X_3 输出弱加仓:X_8 AND X_9 AND X_10