Open-source scriptindicator/v1
Williams Percent Range
Locate the close within its recent high-low range on a scale from minus 100 to zero.
#momentum#oscillator#williams-r
Description
Williams %R is a bounded momentum oscillator that compares the latest close with the highest and lowest prices in its lookback window. Values near zero indicate a close near the range high, while values near -100 indicate a close near the range low.
Open-source script. Everyone can inspect the source code, use the script on a chart, and save an editable copy.
Release notes
Version history · 1 published version
Version 1CurrentChart updatedWilliams Percent Range · Aug 31, 2026
Source codempl-2.0View sourceHide source
indicator("Williams Percent Range", { overlay: false });
const length = input.int("Length", 14, { min: 1, max: 500 });
plot(wpr(length), { title: "%R", color: "#7c4dff", lineWidth: 2 });
hline(-20, { title: "Upper", color: "#ef5350", style: "dashed" });
hline(-50, { title: "Midline", color: "#78909c", style: "dotted" });
hline(-80, { title: "Lower", color: "#26a69a", style: "dashed" });
Community discussion
0 comments
No comments yet. Start the discussion.