OPEN-SOURCE SCRIPT

Dual Momentum OSC

209
Overview:
Momentum OSC is a dual-layered momentum oscillator that blends multi-timeframe momentum readings with moving average crossovers for deeper insight into trend acceleration and exhaustion. Perfect for confirming trend strength or spotting early shifts in momentum.

Features:

✅ Two separate momentum streams with customizable timeframes

✅ Smoothing via moving averages for both momenta

✅ Cross-timeframe momentum structure for confirmation and divergence

✅ Color-coded areas for intuitive visual interpretation

✅ Optional crossover markers to signal bullish/bearish momentum shifts

How It Works:
The script calculates two momentum values by comparing current price sources against lagged values across separate timeframes. Each is smoothed with a moving average to filter noise. The difference between momentum and its moving average forms a core component of trend strength confirmation. Optional visual circles mark bullish or bearish crossovers.

Customizable Inputs:

Timeframes, sources, lengths, and MA periods for both momentum streams

Toggle to display momentum cross signals (circles)

Works on any asset or timeframe

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.