# Triangular Momentum Oscillator & Real Time Divergences

Triangular Momentum Oscillator & Real Time Divergences is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

A smooth oscillator built on the momentum of a triangular moving average, letting divergences register in real time: tops and bottoms are confirmed the moment the first difference crosses zero, with no pivot wait. Optional correlation coloring exposes where the oscillator leads or lags price. For divergence traders who are tired of late signals.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Nov 3, 2020.
- Access: free.
- Concepts: [Momentum](https://www.luxalgo.com/library/concept/momentum/) (primary), [Triangular MA](https://www.luxalgo.com/library/concept/triangular-ma/), [Regular Bullish/bearish Divergence](https://www.luxalgo.com/library/concept/regular-bullish-bearish-divergence/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cmpwn6tfq009mvhsgeti1aebt
- Page: https://www.luxalgo.com/library/indicator/triangular-momentum-oscillator-real-time-divergences/

**Triangular Momentum Oscillator & Real Time Divergences** exploits the smooth properties of a [triangular moving average](https://www.luxalgo.com/library/concept/triangular-ma/) to do what noisier oscillators cannot: confirm divergences as they form. Because the output is smooth, a top or bottom registers the instant its first difference crosses zero (no waiting on pivot confirmation), and the indicator draws connecting lines whenever price and [momentum](https://www.luxalgo.com/library/concept/momentum/) disagree.

## How to Trade the Triangular Momentum Oscillator & Real Time Divergences?

- **Divergence lines**: consecutive oscillator tops or bottoms moving against price flag potential reversals while the setup is still forming.
- **Oscillator direction**: a rising value reads as an uptrend, a declining one as a downtrend, a trend gauge that works even when no divergence is present.
- **Correlation coloring**: with the correlation option enabled, red segments mark negative price/oscillator correlation, the spots where the two move in opposition and reversals tend to brew.

Longer settings filter out short-term variation and surface longer-term shifts. The trade-off is honest: the smoothness that makes divergences legible also introduces some lag, so treat signals as context for a decision rather than precision triggers.

## Triangular Momentum Oscillator & Real Time Divergences Settings

- **Length**: the oscillator period; higher values produce a smoother output.
- **Src**: the input source for the calculation.
- **Show Lines** (enabled by default): draws the lines connecting consecutive tops and bottoms when a divergence is detected.
- **Color Based On Price/Oscillator Correlation**: recolors the oscillator by its correlation with price, with red indicating negative correlation.

## Frequently Asked Questions

### How can divergences be detected in real time?

Most divergence tools wait several bars for a pivot to confirm. Here the oscillator is smooth enough that tops and bottoms are declared when the first difference crosses zero, so the divergence line appears while the move is still tradeable.

### Can I cross-check its signals?

A second, independent divergence source strengthens the case. The [OBV Divergence](https://www.luxalgo.com/library/indicator/obv-divergence/) tool works from a volume stream, so agreement between the two means price and volume are telling the same reversal story.

### Does the Triangular Momentum Oscillator cost anything?

No. It is one of the free builds on the LuxAlgo Library. You can also hand it to Quant, our coding agent, straight from this page to see how its real-time divergence calls have stacked up historically. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [Momentum Cycle Sentry](https://www.luxalgo.com/library/indicator/momentum-cycle-sentry/) (Momentum): markdown at https://www.luxalgo.com/library/indicator/momentum-cycle-sentry.md
- [Momentum Terrain 3D](https://www.luxalgo.com/library/indicator/momentum-terrain-3d/) (Momentum): markdown at https://www.luxalgo.com/library/indicator/momentum-terrain-3d.md
- [Adaptive Momentum Oscillator](https://www.luxalgo.com/library/indicator/adaptive-momentum-oscillator/) (Momentum): markdown at https://www.luxalgo.com/library/indicator/adaptive-momentum-oscillator.md
- [LTF Momentum Projection](https://www.luxalgo.com/library/indicator/ltf-momentum-projection/) (Momentum): markdown at https://www.luxalgo.com/library/indicator/ltf-momentum-projection.md
- [Candle Breakout Oscillator](https://www.luxalgo.com/library/indicator/candle-breakout-oscillator/) (Momentum): markdown at https://www.luxalgo.com/library/indicator/candle-breakout-oscillator.md
- [Oscillator Matrix](https://www.luxalgo.com/library/indicator/luxalgo-oscillator-matrix/) (Regular Bullish/bearish Divergence): markdown at https://www.luxalgo.com/library/indicator/luxalgo-oscillator-matrix.md
- [HTF Reversal Divergences](https://www.luxalgo.com/library/indicator/htf-reversal-divergences/) (Regular Bullish/bearish Divergence): markdown at https://www.luxalgo.com/library/indicator/htf-reversal-divergences.md
- [Rubber Band Liquidity Signals](https://www.luxalgo.com/library/indicator/rubber-band-liquidity-signals/) (Disparity Index): markdown at https://www.luxalgo.com/library/indicator/rubber-band-liquidity-signals.md

---

Source: https://www.luxalgo.com/library/indicator/triangular-momentum-oscillator-real-time-divergences/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
