N1:=6;
N2:=6;
N3:=6;
LC:=REF(CLOSE,1);
rsi1:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(Abs(CLOSE-LC),N1,1)*100;
RSI2:SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100;
RSI3:SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100;
MA60:MA(C,60);
MA5:MA(C,5);
MA10:MA(C,10);
MA20:MA(C,20);
A:20;
D:80;
买:=RSI1<20 OR RSI1<80 AND C>REF(C,1)AND vol<REF(VOL,1)AND MA60>REF(MA60,1) AND MA5>REF(MA5,1)AND MA10>REF(MA10,1)AND MA20>REF(MA20,1);
DRAWTEXT(买,RSI1*0.8,'买'),COLOR0099FF;
卖:=RSI1>80 AND VOL>REF(VOL,1);
DRAWTEXT(卖,RSI1*1.09,'卖'),COLOR0099FF;