VAR1:=(H+L)/2;
AO:=SMA(VAR1,5,1)-SMA(VAR1,34,1),COLOR6699CC;
AC:=SMA((AO-SMA(AO,5,1)),5,1),COLOR6699CC;
X1:=AO REF(AO,1) AND AC REF(AC,1);
X2:=AO REF(AO,1) AND AC REF(AC,1);
Y:=(H+L)/2;
Y3:=REF(Y,3);
Y5:=REF(Y,5);
Y8:=REF(Y,8);
RED:=SMA(Y,8,1);
R2:=REF(RED,5);
KU1:=IF(H=HHV(H,3),1,0);
KD1:=IF(L=LLV(L,3),1,0);
UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0,REF(H,2),REF(H,2+BARSLAST(REF(KU1,2)=1 AND REF(KU1,1)=0 AND KU1=0)));
DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(L,2),REF(L,2+BARSLAST(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0)));
黄:SMA(Y8,13,1),coloryellow;
红:SMA(Y5,8,1),colorred;
绿:SMA(Y3,5,1),colorgreen;
上张:=黄 =REF(黄,1) AND 红 =REF(红,1) AND 绿 =REF(绿,1);
下张:=黄 REF(黄,1) AND 红 REF(红,1) AND 绿 REF(绿,1);
上碎:=IF(H =R2,UL,REF(UL,BARSLAST(H R2)));
下碎:=IF(L =R2,DL,REF(DL,BARSLAST(L =R2)));
STICKLINE(BARSLAST(ABS(上碎-REF(上碎,1))) BARSLAST(C 上碎 AND REF(C,1) REF(上碎,1)),上碎,上碎,3,1),colormagenta;
STICKLINE(BARSLAST(ABS(下碎-REF(下碎,1))) BARSLAST(C 下碎 AND REF(C,1) REF(下碎,1)),下碎,下碎,3,1),colorcyan;
LC := REF(C,4);
RMI:=SMA(MAX(C-LC,0),7,1)/SMA(ABS(C-LC),7,1)*100;
QS:= HHV(MA(RMI,3),13),COLOR00ADFF;
RMIMA:= SMA(RMI,3,1),COLOR009C00;
DRAWKLINE(H,O,L,C);