indicator · own pane · open source

Rate of Change

Deepwick · @deepwickv1Updated 2 Oct 2026▲ 0 users
Running…
Loading chart…

About

Rate of Change (ROC) measures the percentage change of price over N bars. A zero-line oscillator for trend strength — positive = bullish, negative = bearish.

  • Zero-line crosses are momentum shifts.
  • Extreme readings flag short-term blowoffs.
  • Raise Length for steadier swings; lower it for snappy turns.

Source code

//@version=5
indicator("Rate of Change", overlay=false)
len = input.int(10, "Length", minval=1, maxval=200)
src = input.source("close", "Source")
roc = ta.roc(src, len)
hline(0, "Zero", color=color.gray, linestyle=hline.style_dotted)
p_ROC = plot(roc, "ROC", color=color.lime, linewidth=2)
alertcondition(ta.crossover(roc, 0), "ROC crosses zero up", "Rate of change turned positive")
alertcondition(ta.crossunder(roc, 0), "ROC crosses zero down", "Rate of change turned negative")

Comments

No comments yet.

Sign in to comment.