VAR1:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;
VAR2:=SMA(SMA(VAR1,3,1),3,1)/28.57;
VAR3:=EMA(VAR2,5);
VAR4:=3*VAR2-2*VAR3;
VAR5:=crOSS(VAR4,VAR2) AND VAR2<2.1 AND CLOSE>OPEN;
VAR6:=CROSS(VAR4,VAR2) AND VAR2<2.1 AND CLOSE>OPEN;
VAR7:=(2*CLOSE+HIGH+LOW)/4;
VAR8:=LLV(LOW,13);
VAR9:=HHV(HIGH,13);
VAR10:=EMA((VAR7-VAR8)/(VAR9-VAR8)*100,13);
VAR11:=EMA(0.667*REF(VAR10,1)+0.333*VAR10,2);
VAR12:=VAR10;
VA1:=EMA(H,25),COLORGREEN;
VA2:=EMA(L,25),COLORGREEN;
ABC111:=PLOYLINE(C>VA1,VA1);
A222:=IF(C>VA1,ABC111,DRAWNULL),COLORRED;
B111:=PLOYLINE(C>VA2,VA2);
B222:=IF(C>VA2,B111,DRAWNULL),COLORRED;
STICKLINE(VAR10>VAR11,VAR10,VAR11,3,0),COLOR0055AA;
STICKLINE(VAR10>VAR11,VAR10,VAR11,2.8,0),COLOR0066BB;
STICKLINE(VAR10>VAR11,VAR10,VAR11,2.5,0),COLOR0077CC;
STICKLINE(VAR10>VAR11,VAR10,VAR11,2.2,0),COLOR0088DD;
STICKLINE(VAR10>VAR11,VAR10,VAR11,1.7,0),COLOR0099EE;
STICKLINE(VAR10>VAR11,VAR10,VAR11,1.2,0),COLOR00AAFF;
STICKLINE(VAR10>VAR11,VAR10,VAR11,0.7,0),COLOR00CCFF;
STICKLINE(VAR10>VAR11,VAR10,VAR11,0.2,0),COLORYELLOW;
STICKLINE(VAR10<=VAR11,VAR10,VAR11,3,0),COLOR990099;
STICKLINE(VAR10<=VAR11,VAR10,VAR11,2.8,0),COLOR990088;
STICKLINE(VAR10<=VAR11,VAR10,VAR11,2.5,0),COLOR990077;
STICKLINE(VAR10<=VAR11,VAR10,VAR11,2.2,0),COLOR990066;
STICKLINE(VAR10<=VAR11,VAR10,VAR11,1.7,0),COLOR990055;
STICKLINE(VAR10<=VAR11,VAR10,VAR11,1.2,0),COLORBB00BB;
STICKLINE(VAR10<=VAR11,VAR10,VAR11,0.7,0),COLORDD00DD;
STICKLINE(VAR10<=VAR11,VAR10,VAR11,0.2,0),COLORMAGENTA;
VAR13:=10;
安全区:20,COLORLIRED;
中轨:50,COLORYELLOW;
高位:80,COLORLIBLUE;
启动:EMA(0.382*REF(VAR10,2)+0.618*VAR10,6),COLORRED;
NOTEXT2:IF(启动>REF(启动,1),启动,DRAWNULL),COLORRED,LINETHICK4;
NOTEXT3:IF(启动<REF(启动,1),启动,DRAWNULL),COLORLIBLUE,LINETHICK2;
共振:=BARSLASTCOUNT(VAR10>VAR11 AND NOTEXT2)=1;
STICKLINE(共振 AND B222,82,20,0.005,0),COLORRED;
DRAWICON(共振 AND B222,85,25),COLORYELLOW;
DRAWICON(共振 AND B222,75,26),COLORYELLOW;
DRAWICON(共振 AND B222,65,27),COLORYELLOW;