N:=7;
D:=28;
TYP:=(HIGH+LOW+CLOSE)/3;
QX1:=(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N)) COLORWHITE;
QX3:=(TYP-MA(TYP,D))/(0.015*AVEDEV(TYP,D)) COLORRED;
A1:=HHV(QX3,BARSLAST(CROSS(-180,QX3))+1)<100;
A2:=HHV(QX1,BARSLAST(CROSS(QX1,-100))+1)-HHV(QX3,BARSLAST(CROSS(QX1,-100))+1)>100;
A3:=HHV(QX1,BARSLAST(CROSS(QX3,-100))+1)-HHV(QX3,BARSLAST(CROSS(QX3,-100))+1)>100;
A4:=A2 OR A3;
A5:=REF(QX1,1)<QX1 AND REF(QX1,1)<-100;
A6:=REF(QX3,1)<QX3 AND REF(QX3,1)<-100;
A7:=A6 OR A5;
XGSC:A1 AND A4 AND A7;
九毛八公式解读
N赋值:7 D赋值:28 TYP赋值:(最高价+最低价+收盘价)/3 QX1赋值:(TYP-TYP的N日简单移动平均)/(0.015*TYP的N日平均绝对偏差) 画白色 QX3赋值:(TYP-TYP的D日简单移动平均)/(0.015*TYP的D日平均绝对偏差) 画红色 A1赋值:上次-180上穿QX3距今天数+1日内QX3的最高值<100 A2赋值:上次QX1上穿-100距今天数+1日内QX1的最高值-上次QX1上穿-100距今天数+1日内QX3的最高值>100 A3赋值:上次QX3上穿-100距今天数+1日内QX1的最高值-上次QX3上穿-100距今天数+1日内QX3的最高值>100 A4赋值:A2 OR A3 A5赋值:1日前的QX1