indicator · own pane · open source
Momentum indicator
Momentum is a free open-source indicator. Momentum is the raw point difference between price N bars ago and the current bar. Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What Momentum does
Momentum is the raw point difference between price N bars ago and the current bar. Same zero-line logic as ROC, but in absolute price units rather than percent.
- Best on shares of fixed-point value; for crypto/forex prefer ROC.
- Zero-line crosses are momentum signals.
- Pair with a price envelope to normalise.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("Momentum", overlay=false)
len = input.int(10, "Length", minval=1, maxval=200)
src = input.source(close, "Source")
colorLight2 = input.color("color.aqua", "Color Light2")
colorNeutral = input.color("color.gray", "Color Neutral")
mom = ta.mom(src, len)
hline(0, "Zero", color=colorNeutral, linestyle=hline.style_dotted)
p_Momentum = plot(mom, "Momentum", color=colorLight2, linewidth=2)
alertcondition(ta.crossover(mom, 0), "Mom crosses zero up", "Momentum turned positive")
alertcondition(ta.crossunder(mom, 0), "Mom crosses zero down", "Momentum turned negative")
No comments yet.
Sign in to comment.