原码:
{n=6,n1=7,n2=13,n3=21}
R1:=100*(HHV(HIGH,N)-CLOSE)/(HHV(HIGH,N)-LLV(LOW,N));
R2:=100*(HHV(HIGH,N1)-CLOSE)/(HHV(HIGH,N1)-LLV(LOW,N1));
wr1:ema(ema(r1,3),3),coloryellow;
wr2:ema(ema(r2,3),3),colorred;
mm:=ema(ema(c,10),3);
LC:=REF(CLOSE,1);
I1:=SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*100;
I2:=SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*100;
I3:=SMA(MAX(CLOSE-LC,0),N3,1)/SMA(ABS(CLOSE-LC),N3,1)*100;
rsi1:ema(ema(I1,3),3),colorf00ff0;
rsi2:ema(ema(I2,3),3),colorf0f000;
rsi3:ema(ema(I3,3),3),color00ff00;
mj:=CROSS(rsi1,wr1) and mm%26gt;=ref(mm,1);
买进:filter(mj,15);
DRAWICON(买进,rsi1,1);