# OsMA

Plots OsMA (the spread between 12- and 26-period EMAs minus its 9-period signal line) as a four-state histogram separating growing from fading momentum on each side of zero. A sign flip across the dotted zero line is exactly a signal-line crossover, and alerts cover both crosses plus the first shrinking bar on either side. A clean build of the classic gauge.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Apr 2, 2026.
- Access: free.
- Concepts: [OsMA](https://www.luxalgo.com/library/concept/osma/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=lj4zi7d293te61lv89ywhjse
- Page: https://www.luxalgo.com/library/indicator/osma/

**OsMA** plots the classic [OsMA](https://www.luxalgo.com/library/concept/osma/) (an oscillator's distance from its own signal average) as a four-state histogram. The oscillator is the spread between a 12-period and a 26-period EMA of the source; its 9-period EMA is the signal; and the columns show their difference around a dotted zero line, so a sign flip is exactly a signal-line crossover. Positive bars split into growing and fading tones, negative bars likewise, putting the difference between momentum building and momentum decelerating directly into the paint.

## How to Trade the OsMA?

- **Bullish zero cross**: the histogram flips positive: the oscillator crossed above its signal line.
- **Bearish zero cross**: the mirror flip below zero.
- **Fading bars**: a bar shrinking toward zero means momentum on that side is decelerating; dedicated alerts fire on the first shrinking bar after growth on either side.
- **Growing bars**: momentum extending away from zero in the bar's direction: the trend side is still pressing.

Because OsMA differences an already-derived series, it turns quickly: treat a single fading bar as a caution flag rather than a standalone signal, and let the zero cross confirm the turn. All four events carry alert conditions.

## OsMA Settings

- **Source** (default close): the price series behind both averages.
- **Fast Length** (default 12): the fast EMA of the underlying oscillator.
- **Slow Length** (default 26): the slow EMA subtracted from the fast one to form the oscillator.
- **Signal Length** (default 9): the EMA of the oscillator whose subtraction produces OsMA; a zero cross of the histogram is a cross of this line.
- Style inputs set the four histogram states (growing and fading on each side of zero) and the zero line color.

## Frequently Asked Questions

### How does OsMA relate to the MACD histogram?

At standard settings, numerically yes: the histogram pane of a [MACD](https://www.luxalgo.com/library/indicator/macd/) plots the same subtraction OsMA isolates. The separate name is a labeling convention from another corner of the trading world; this build keeps the quantity standalone with four-state coloring.

### What do the faded colors mean?

A faded bar is one shrinking toward zero: momentum on that side is decelerating, the condition from which signal-line crosses develop. That early-warning distinction is the histogram's main content, so it gets its own colors and alerts.

### What are the limitations?

As a second-order series it whipsaws in ranging conditions, flipping sign repeatedly around zero. It measures the gap between momentum and its own average, not trend, so pair it with market structure or an explicit trend filter before treating crosses as entries.

## Related indicators

- [Adaptive MACD](https://www.luxalgo.com/library/indicator/adaptive-macd/) (MACD): markdown at https://www.luxalgo.com/library/indicator/adaptive-macd.md
- [MACD Based Price Forecasting](https://www.luxalgo.com/library/indicator/macd-based-price-forecasting/) (MACD): markdown at https://www.luxalgo.com/library/indicator/macd-based-price-forecasting.md
- [Volume-weighted MACD](https://www.luxalgo.com/library/indicator/volume-weighted-macd/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/volume-weighted-macd.md
- [Impulse MACD](https://www.luxalgo.com/library/indicator/impulse-macd/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/impulse-macd.md
- [MACD-V](https://www.luxalgo.com/library/indicator/macd-v/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/macd-v.md
- [Schaff Trend Cycle](https://www.luxalgo.com/library/indicator/schaff-trend-cycle/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/schaff-trend-cycle.md
- [Zero-lag MACD](https://www.luxalgo.com/library/indicator/zero-lag-macd/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/zero-lag-macd.md
- [MACD](https://www.luxalgo.com/library/indicator/macd/) (Momentum & Oscillators): markdown at https://www.luxalgo.com/library/indicator/macd.md

---

Source: https://www.luxalgo.com/library/indicator/osma/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
