M:=20;
N:=20;
N1:=25;
M1:=6;
M2:=6;
BOLL:=MA(CLOSE,M);
UB:=BOLL+2*stD(CLOSE,M);
LB:=BOLL-2*STD(CLOSE,M);
MID := MA(CLOSE,N);
X1:=CROSS(CLOSE,UB);
UPPER:=(1+M1/100)*MA(CLOSE,N1);
LOWER:=(1-M2/100)*MA(CLOSE,N1);
ene:=(UPPER+LOWER)/2;
X2:=CROSS(CLOSE,UPPER);
GG:X1 AND X2;
九毛八公式解读
M赋值:20 N赋值:20 N1赋值:25 M1赋值:6 M2赋值:6 BOLL赋值:收盘价的M日简单移动平均 UB赋值:BOLL+2*收盘价的M日估算标准差 LB赋值:BOLL-2*收盘价的M日估算标准差 赋值: 收盘价的N日简单移动平均 X1赋值:收盘价上穿UB UPPER赋值:(1+M1/100)*收盘价的N1日简单移动平均 LOWER赋值:(1-M2/100)*收盘价的N1日简单移动平均 ENE赋值:(UPPER+LOWER)/2 X2赋值:收盘价上穿UPPER 输出GG:X1 AND X2