Momentum
All indicators

LibraryMomentum

Indicator

Momentum

How far price has moved over the last bars, in price units.

MomentumOwn pane2 inputsMOM

How it is calculated

Momentum is the price minus the price length bars ago, on the chosen source, with no smoothing. As TA-Lib MOM.

Reference: TA-Lib MOM

How to read it

Above zero price is higher than at the start of the window, below zero lower; the distance from zero is the size of the move. In price units, so values cannot be compared between markets or across years with very different prices; ROC does that in percent. A momentum that falls while price still rises shows the move slowing.

In a strategy

A simple trend filter: ctx.ind("mom", length=10) > 0 allows longs only while price is above where it was ten bars ago, with an exit when it turns negative.

Inputs

InputTypeDefaultRange or choices
LengthlengthWhole number10min 1, max 5000
SourcesourcePrice"close"close, open, high, low, hl2, hlc3, ohlc4, hlcc4

What it draws

LineDrawn as
MomentumLine

Guide lines at 0.

Used in

No strategy template reads it yet.

OrionQuant