Momentum

Momentum measures the rate of change of the price over a specified number of bars.

Role in the strategy

SlotAvailableRole
Entry PointNo—
Entry RuleYesFilters entries by the Momentum direction or its level position.
Exit PointNo—
Exit RuleYesTriggers exits by the Momentum direction or its level position.

The Momentum produces conditions, not order prices. As an entry rule it is ANDed with the entry point and the other entry rules; as an exit rule it is ORed with the other exit rules. See Indicators for the slot semantics.

Logic rules

The indicator offers the standard oscillator rule set, evaluated on the Momentum value:

RuleLong signal is 1 whenShort signal is 1 when
Momentum risesMomentum rose on the previous barMomentum fell on the previous bar
Momentum fallsMomentum fell on the previous barMomentum rose on the previous bar
Momentum is higher than the Level lineMomentum is above LevelMomentum is below 200 − Level
Momentum is lower than the Level lineMomentum is below LevelMomentum is above 200 − Level
Momentum crosses the Level line upwardMomentum crossed above Level from belowMomentum crossed below 200 − Level from above
Momentum crosses the Level line downwardMomentum crossed below Level from aboveMomentum crossed above 200 − Level from below
Momentum changes its direction upwardMomentum formed a valley (down then up)Momentum formed a peak (up then down)
Momentum changes its direction downwardMomentum formed a peak (up then down)Momentum formed a valley (down then up)

The Level parameter sets the long threshold; the short threshold is always 200 − Level. With the default Level of 100, both sides use 100: the value is above 100 in an uptrend and below 100 in a downtrend.

Parameters

ParameterTypeDefaultRangePurpose
Apply toselectCloseOpen, High, Low, Close, Median, Typical, WeightedPrice series the Momentum is calculated from
Periodnumber141 to 1000Bars between the compared prices
Levelnumber10050 to 150Long threshold; the short threshold is 200 − Level

Calculation

tech.Momentum in engine/indicator-engine/tech.ts computes Momentum = Current Price / Price N bars ago × 100. A value above 100 means the price is rising, below 100 that it is falling. The line is drawn in a separate chart pane.

Backtesting

  • The rule is evaluated on the previous (closed) bar with the standard dead zone (SIGMA = 0.000001).
  • The indicator contributes only long/short signal arrays — it never changes the entry or exit order price.
  • An entry happens only when the entry point allows the direction and every entry rule passes; an exit happens when the exit point is reached and any exit rule passes.