# OsMA

A Momentum & Oscillators concept (MACD lineage) in the LuxAlgo Library, with 1 indicator implementation.

## What is OsMA?

OsMA stands for Oscillator of a Moving Average (some platforms list it as Moving Average of Oscillator). It plots the difference between an oscillator and its signal line, a moving average of that same oscillator. In the standard form the oscillator is the [MACD](https://www.luxalgo.com/library/concept/macd/) line and the signal is its 9-period average, which makes OsMA numerically identical to the MACD histogram: the same values under a different name, a convention popularized by the built-in indicator lists of retail forex platforms.

The lineage runs through MACD itself. Gerald Appel developed the MACD in the late 1970s, and Thomas Aspray added the histogram in 1986 precisely to visualize the gap between the MACD line and its signal line before a crossover completes. OsMA is that same quantity carried into the retail forex world: MetaTrader shipped it as a standard indicator under the Moving Average of Oscillator name, and the platform's enormous user base made the OsMA label common currency even though the calculation itself dates to the 1980s.

Subtracting the signal isolates how far [momentum](https://www.luxalgo.com/library/concept/momentum/) has pulled away from its own average. Growing OsMA bars mean the MACD line is pulling away from its signal, momentum building in that direction; shrinking bars mean the two are converging, which is what precedes a signal-line cross. Because it differences an already-derived series, OsMA tends to turn earlier than the MACD line itself but is also noisier, so readings usually focus on bar-to-bar direction and zero crosses rather than absolute height.

Because OsMA is unbounded, it has no fixed [overbought or oversold](https://www.luxalgo.com/library/concept/overbought-oversold/) levels: a histogram extreme on a calm chart would be an ordinary bar on a volatile one, and readings are not comparable across instruments. That separates it from bounded tools like [RSI](https://www.luxalgo.com/library/concept/rsi/) or the [stochastic oscillator](https://www.luxalgo.com/library/concept/stochastic-oscillator/) and explains the reading conventions: bar direction, sign flips, and divergences carry the information, while absolute bar height mostly reflects recent volatility.

## How to identify OsMA on a chart

OsMA plots as a histogram in a subpanel around a zero line, and verifying what a given platform calls OsMA takes one comparison.

1. Compute the standard MACD line: the 12-period EMA of closes minus the 26-period EMA.
2. Compute the signal line, a 9-period EMA of that MACD line.
3. Subtract the signal from the MACD line and plot the result as bars around zero; positive bars mean the MACD line is above its signal, negative bars mean below.
4. Check it against the MACD histogram on the same chart: with default settings the two plots should be numerically identical, and any difference means the platform generalizes OsMA to another oscillator or uses non-standard smoothing.
5. Read the shape: growing bars are momentum pulling away from its average, shrinking bars are convergence, and a sign flip is the signal-line crossover itself.

## How traders use it

- As a crossover trigger: OsMA crossing zero is exactly a MACD signal-line cross expressed as a sign flip, so systems often use the bars turning positive or negative as the entry or exit event.
- As an early deceleration warning: bars that shrink while price keeps extending show momentum fading before any cross prints, a cue to tighten stops or skip late entries.
- As a divergence source: comparing OsMA peaks and troughs against price swing highs and lows is a common way to mark [regular divergence](https://www.luxalgo.com/library/concept/regular-bullish-bearish-divergence/), since the histogram's extremes are well defined, with [hidden divergence](https://www.luxalgo.com/library/concept/hidden-divergence/) read the same way in continuation contexts.
- As a trend-side filter: some traders take entries only in the direction of OsMA's sign, treating positive bars as permission for longs and negative bars for shorts, combined with structure so range-bound flips are filtered out.
- For exit timing: a shrinking histogram into a target zone argues for taking profit or tightening the stop before the crossover confirms, using the deceleration itself as the actionable event.

## OsMA vs other momentum readings

- **MACD** (https://www.luxalgo.com/library/concept/macd/): MACD is the parent plot: two lines whose crossover is the classic signal. OsMA collapses that relationship into one histogram showing the distance between the lines, so it surfaces the same events earlier in shape, through shrinking bars, but contains no information the two lines do not.
- **ROC** (https://www.luxalgo.com/library/concept/roc/): ROC measures price change over a fixed lookback, one step from price and expressed in percent, so readings compare across instruments. OsMA is a difference of derived averages in price units, so its scale depends on the instrument and its volatility, while its turns tend to be smoother.
- **Momentum** (https://www.luxalgo.com/library/concept/momentum/): The momentum indicator is the rawest reading, the close minus the close N bars back: fast and noisy. OsMA sits toward the other end of the same spectrum, where multiple smoothing layers make turns cleaner but slower to register a sudden shift.

## FAQ

### Is OsMA the same as the MACD histogram?

With default settings, yes. OsMA is defined as the oscillator minus its signal line, and the standard configuration uses the MACD line minus its 9-period signal, which is exactly the histogram's formula. Some platforms generalize OsMA to other oscillators, but on most charts the two plots are numerically identical and differ only in name.

### What does an OsMA zero-line cross mean?

It means the oscillator has crossed its own signal average; for the MACD version, that is the signal-line crossover shown as a sign change. It says momentum has turned relative to its recent average, not that the trend has reversed. In ranging markets these flips arrive in quick succession and whipsaw, so most traders filter them with trend or structure context.

### What are good OsMA settings?

The default inherits MACD's 12, 26, and 9. Shorter values make bars flip sign more often, suiting faster timeframes at the cost of noise; longer values smooth the histogram but delay the sign flips most OsMA strategies key on. As with any parameter choice, values should be tested on the specific market rather than adopted from a forum post.

### Is OsMA the same as the Awesome Oscillator?

No. The Awesome Oscillator is the difference between a 5-period and a 34-period simple moving average of the bar midpoint, a first-order construction with no signal line involved. OsMA is the gap between an oscillator and its own signal average. Both print as histograms around zero, which is where the confusion comes from.

### Can OsMA be used alone as a trading system?

Zero-cross systems built on OsMA alone are easy to code and routinely struggle in ranges, where the sign flips repeatedly without follow-through. In practice it works better as the timing layer inside a larger plan: trend or structure defines context and direction, and OsMA times the entry or exit within it.

## Implementations in the Library

- OsMA (LuxAlgo): https://www.luxalgo.com/library/indicator/osma/

## Related concepts

- MACD: https://www.luxalgo.com/library/concept/macd/
- PPO: https://www.luxalgo.com/library/concept/ppo/
- APO: https://www.luxalgo.com/library/concept/apo/
- Zero-lag MACD: https://www.luxalgo.com/library/concept/zero-lag-macd/
- MACD-V: https://www.luxalgo.com/library/concept/macd-v/
- Impulse MACD: https://www.luxalgo.com/library/concept/impulse-macd/
- Volume-weighted MACD: https://www.luxalgo.com/library/concept/volume-weighted-macd/
- Schaff Trend Cycle: https://www.luxalgo.com/library/concept/schaff-trend-cycle/

---

Source: https://www.luxalgo.com/library/concept/osma/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/