VAR0:=(CLOSE - ma(CLOSE,5)) / MA(CLOSE,5);
LHX:=(VAR0) * 100;
VAR1:=5;
LHX1:=EMA(LHX,VAR1) * VAR1 ,COLORMAGENTA;
LHX2:=MA(LHX1,3),COLORGREEN ;
LHX3:=MA(LHX1,5),COLORWHITE;
SVAR4:=(REF(LHX1,1) < REF(LHX1,2) AND LHX1 > REF(LHX1,1)) OR crOSS(LHX1,LHX2) ;
SVAR5:=(SVAR4 OR CROSS(LHX1,LHX3)) AND COUNT(LHX1 < -5,3) >= 1 AND LHX1 - REF(LHX1,1) > 1 ;
N:=9;
M1:=3;
M2:=3;
RSV:= (HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N))*100;
Lwr1:=SMA(RSV,M1,1);
LWR2:=SMA(LWR1,M2,1);
买入:=FILTER(SVAR5 AND LWR1 < REF(LWR1,1),2),COLOR0000FF ;
进:买入;