C1:=(((10000 * CLOSE) / INDEXC));Var1:=REF(c1,1);A1:=(MAX(c1-Var1,0),7,1)/SMA(A(c1-Var1),7,1)*100;Var2:=REF(c1,2);A2:=SMA(MAX(c1-Var2,0),7,1)/SMA(ABS(c1-Var2),7,1)*100;Var3:=REF(c1,3);A3:=SMA(MAX(c1-Var3,0),7,1)/SMA(ABS(c1-Var3),7,1)*100;Var4:=REF(c1,4);A4:=SMA(MAX(c1-Var4,0),7,1)/SMA(ABS(c1-Var4),7,1)*100;X1:=(A1+A2+A3+A4)/4;FILLRGN(30,XRSI1,XRSI1>=30,188188);FILLRGN(50,XRSI1,XRSI1>=50,883399);FILLRGN(70,XRSI1,XRSI1>=70,003300);XRSI:(A1+A2+A3+A4)/4,COLORYELLOW,LINETHICK1;MX13:MA(XRSI,13),COLORR