Skip to content

Williams %R ​

Close relative to the N-bar high, -100 to 0.

Kind indicator · Drawn in its own pane

Try it ​

On the chart, press / and choose Williams %R under Oscillators. To change it, copy the source below into the AlphaScript editor.

Inputs ​

InputTypeDefault
Lengthint14
Colorcolor"#7E57C2"

Source ​

From packages/alphascript/indicators/williamsr.as.js.

js
indicator({ name: "Williams %R", shortTitle: "%R", overlay: false, precision: 2 });
plot(ta.wpr(input.int("Length", 14, { min: 1 })), { title: "%R", color: input.color("Color", "#7E57C2", { group: "Style" }) });
hline(-20, { title: "Upper band", color: "#787B86", style: "dashed" });
hline(-50, { title: "Middle band", color: "rgba(120,123,134,0.5)", style: "dotted" });
hline(-80, { title: "Lower band", color: "#787B86", style: "dashed" });
fill(-20, -80, { title: "Background", color: "rgba(126,87,194,0.1)" });

AlphaScript language v0.1 · runtime 0.2.0