indicator · own pane · open source

Relative Momentum indicator

Relative Momentum is a free open-source indicator. Relative Momentum — rate-of-change of price minus rate-of-change of its SMA. Deepwick Script runs a subset of Pine Script.

v1Updated 3 Oct 2026▲ 0 users
Running…
Loading chart…

What Relative Momentum does

Relative Momentum — rate-of-change of price minus rate-of-change of its SMA. Positive = price is accelerating faster than its own average (momentum building), negative = losing steam.

  • Lead reversal sign so turns at 0 are early warnings for trend changes.

Source code

Deepwick Script, a subset of Pine Script · read-only

//@version=6
indicator("Relative Momentum", overlay=false)
len = input.int(14, "Length", minval=5, maxval=100)
colorLine = input.color("color.blue", "Color  Line")
colorNeutral = input.color("color.gray", "Color  Neutral")
rmom = ta.roc(close, len) - ta.roc(ta.sma(close, len), len)
hline(0, "Zero", color=colorNeutral)
p_Rel_Mom = plot(rmom, "Rel Mom", color=colorLine, linewidth=2)
alertcondition(ta.crossover(rmom, 0), "Momentum up", "Relative momentum crossed above zero")
alertcondition(ta.crossunder(rmom, 0), "Momentum down", "Relative momentum crossed below zero")

Comments

No comments yet.

Sign in to comment.