Open-source scriptindicator/v1
Rate of Change
Express price movement as a percentage change from a configurable number of bars ago.
#momentum#oscillator#roc
Description
Rate of Change is an unbounded momentum oscillator that measures the percentage difference between current price and price a selected number of bars earlier. Positive and negative readings show direction, while magnitude reflects the pace of movement.
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 updatedRate of Change · Aug 31, 2026
Source codempl-2.0View sourceHide source
indicator("Rate of Change", { overlay: false });
const length = input.int("Length", 9, { min: 1, max: 500 });
const source = input.source("Source", "close");
plot(roc(source, length), { title: "ROC", color: "#2962ff", lineWidth: 2 });
hline(0, { title: "Zero", color: "#78909c", style: "dotted" });
Community discussion
0 comments
No comments yet. Start the discussion.