Dynamic Momentum Index Pass Node

Dynamic Momentum Index — Series Input

MomentumAdaptive OscillatorPass

Overview

The Dynamic Momentum Index Pass Node computes the Dynamic Momentum Index (DMI) on a series input. DMI is an adaptive RSI that automatically adjusts its lookback period based on market volatility — shorter periods in volatile markets, longer periods in quiet markets.

Developed by Tushar Chande, DMI solves the fixed-period limitation of standard RSI. By adapting to current volatility, it maintains sensitivity without generating excessive noise in calm conditions or being too slow in fast-moving markets.

Formula

σ_current = std(close, stdPeriod) [current volatility]
σ_avg = average of σ over recent history
dynamicPeriod = clamp(floor(basePeriod / (σ_current / σ_avg)), 3, 30)
DMI[i] = RSI(dynamicPeriod) at bar i
Output range: [0, 100]. Shorter period in high volatility; longer in low volatility.

Parameters

ParameterDefaultDescription
basePeriod14Base RSI period used when volatility is at its average
stdPeriod5Standard deviation period for measuring current volatility

Inputs & Outputs

SlotDirectionTypeDescription
inputInput{ values, timestamps }Price or any numeric series
valuesOutput(number | null)[]DMI values in [0, 100]; nulls during warm-up
timestampsOutputnumber[]Unix timestamps aligned to input

Use Cases

Volatility-Adaptive Signals

Use DMI as a drop-in replacement for RSI when markets alternate between calm and volatile regimes — DMI automatically adjusts sensitivity without manual re-tuning.

Multi-Regime Trading

In low-volatility periods, DMI uses a longer period (smoother, fewer signals). In high-volatility periods, it shortens (more responsive). One node handles both regimes.

Overbought / Oversold Filtering

Standard 70/30 thresholds apply to DMI output just as with RSI. Extreme readings remain at consistent volatility-adjusted levels rather than skewing during calm or chaotic markets.

Tips & Best Practices

Period Clamping

Dynamic period is clamped between 3 and 30 to prevent degenerate calculations. Extreme volatility spikes will not push the period below 3 bars.

stdPeriod Sensitivity

A small stdPeriod (3–5) reacts to very recent volatility changes. A larger stdPeriod (10–20) averages out short spikes and changes the dynamic period more gradually.

Inspect Dynamic Period

Log the computed dynamic period over time to understand how the indicator is adapting. If the period rarely changes, consider a smaller stdPeriod for more responsiveness.

Related Indicators