[On Balance Volume] [MACD] [Accelerator/Awesome Oscillator] + PivDiv 3
Nov 25, 2019

The [On Balance Volume] [MACD] [Accelerator/Awesome Oscillator] + PivDiv 3 indicator provides a multi-functional analysis toolkit that combines four popular momentum and volume oscillators with automated multi-period pivot divergence detection. It allows traders to toggle between On Balance Volume (OBV), MACD, Accelerator Oscillator (AC), and Awesome Oscillator (AO) while simultaneously identifying regular and hidden divergences across three distinct timeframes.
Usage
This tool is designed to identify momentum shifts and trend exhaustion by overlaying pivot-based divergences onto the selected oscillator. Users can choose a primary calculation (MACD, OBV, AC, or AO) and the script will automatically calculate divergences based on that specific data source.
- Momentum Analysis: Switch between the Accelerator Oscillator (AC) or Awesome Oscillator (AO) to identify short-term momentum changes.
- Volume Sentiment: Use the OBV mode to track cumulative volume flow relative to price action.
- Trend Reversals: Regular divergences (indicated by green "▲/⇧" for bullish and red "▼/⇩" for bearish) signal potential trend reversals.
- Trend Continuation: Hidden divergences (indicated by white or yellow characters) suggest that the prevailing trend is likely to continue.
- Multi-Period Detection: The script checks three separate lookback periods (Short, Medium, Long) to ensure that both minor and major pivot points are captured.
Details
The script utilizes pivot point logic to identify local highs and lows in both price and the selected oscillator. A "pivot" is confirmed when a bar is the highest or lowest within a specified range of bars to its left (History) and right (Future).
Because the script requires "Right Bars" to confirm a pivot, there is an inherent delay in the appearance of divergence signals equal to the number of bars specified in the "RightBars" setting. Users can optimize this for different timeframes; for example, signals on a 1-hour chart might be confirmed more clearly when viewing the same data on a 2-hour or 4-hour timeframe.
Settings
General
- Choice Indicator: Selects the active oscillator (MACD, OBV, AC, AO).
- Source: The price data used for general calculations.
- Sensitivity Divergences: Adjusts how strictly the script compares consecutive pivots.
AC/AO
- Short/Long Lengths: Customizes the periods for the fast and slow simple moving averages used in the Awesome and Accelerator oscillators.
MACD
- Fast/Slow/Signal Length: Parameters for the Moving Average Convergence Divergence calculation.
- SMA instead of EMA: Toggles the moving average type used for the MACD line and the Signal line.
Divergences
- Source Divergences [MACD]: Choose whether to calculate divergences based on the MACD line, the Signal line, or the Histogram.
- [xLeftBars = xRightBars]: When enabled, setting the LeftBars value will automatically update the RightBars to match, ensuring symmetrical pivot detection.
- Period Toggles (Long, Medium, Short): Enables or disables divergence detection for specific lookback ranges.
- LeftBars/RightBars: Defines the lookback and lookahead required to confirm a pivot point.
- Show Hidden Divergences: Toggles the visibility of hidden bullish and bearish divergence signals.
FAQ
How do I interpret the different divergence symbols?
Regular bullish divergences are shown as green arrows/up-shifts, while regular bearish divergences are red arrows/down-shifts. Hidden divergences, used for trend continuation, are displayed in white (Short/Medium) or yellow (Long) characters.
Why is there a delay in the divergence signals appearing?
The indicator uses pivots that require a certain number of bars to the right of the peak or valley to confirm it is a local extreme. This "RightBars" setting creates a small, necessary delay to ensure accuracy.
How can I access [On Balance Volume] [MACD] [Accelerator/Awesome Oscillator] + PivDiv 3?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.