All indicators

Moving Averages Proximity Oscillator

By LuxAlgoAug 9, 2022

Moving Averages Proximity Oscillator is an indicator on Vela, our next-generation charting platform, written in Pine Script®.

Static chart image

Moving Averages Proximity Oscillator evaluates every simple moving average between two user-set lengths, an entire MA ribbon condensed into two lines. The first output counts how many of those SMAs price currently exceeds, shown as a 0-100 percentage by default or, with Normalized off, offset by the Minimum Length onto the same period scale as the Proximity Index; the second, the Proximity Index, reports which moving average period sits closest to price. Together they read trend strength and reversal risk from the same span of averages.

How to Trade the Moving Averages Proximity Oscillator?

  • Price Above MA's high or rising: price is clearing most of the measured SMAs, a broad, intuitive gauge of trend strength and direction. Longer length ranges describe the long-term trend; shorter ranges track immediate momentum.
  • Proximity Index climbing: price is gravitating toward longer-period SMAs, the signature of a fading move and a cue that a new trend may be forming, rather than a directional signal in itself.
  • Read the pair together: direction from the first output, turn risk from the second; strong trend readings paired with a rising Proximity Index are an early warning worth respecting.

In spirit it is a cousin of the Disparity Index: both quantify price's relationship to its averages, but here the whole length spectrum is polled at once instead of a single MA.

Moving Averages Proximity Oscillator Settings

  • Minimum Length: the shortest SMA period included in the span.
  • Maximum Length: the longest SMA period under analysis.
  • Smooth: smooths both outputs to taste.
  • Normalized: converts raw counts into a 0-100 percentage scale for easier reading.
  • Src: the input source the calculations run on.

Frequently Asked Questions

Free to use

Run it on Vela. Go further with a paid plan.

  • Up to 500 Custom Alerts, with webhook automation
  • Up to 10× the chart history of Free
  • Orderflow lookback up to full history
  • More Quant usage to customize it, plus extra usage when you need it
  • Futures data alongside crypto, stocks, forex and commodities
See plans

Also works on

TradingView
NinjaTrader
MetaTrader 4/5
Original indicatorBuilt in-house by LuxAlgo

Run it on Vela. Make it yours with Quant.

Open this indicator free on Vela, our next-generation charting platform. Then ask Quant, our coding agent built into Vela, to retune it or turn it into a backtested strategy of your own.