//Compute %R Williams Indicator twice, once with the High and second with the low instead of the close
c1=Williams[11](high)
c2=Williams[11](low)
//Compare with the Overbought conditions
if c1 >-20 and c1 > c1[1] then
b = close+(0.1*close)-close
//Compare with the Oversold conditions
elsif c2 < -80 and c2 < c2[1] then
b=close -(0.1*close)-close
endif
//Backgroundcolors and arrow's up and down
if b >= 0 then
BACKGROUNDCOLOR(0,0,0,25)
if b crosses over 0 then
DRAWARROWUP(barindex, low-1.5*AverageTrueRange[14](close))coloured(0,0,0,255)
endif
elsif b < 0 then
BACKGROUNDCOLOR(0,0,0,45)
if b crosses under 0 then
DRAWARROWDOWN(barindex, high +1.5*AverageTrueRange[14](close))coloured (255,255,255,255)
endif
endif
return b