All indicators

Gradient Money Flow Divergence Detector

Jul 25, 2023

Static chart image
Volume BasedSignalsOscillatorsDivergences

The Gradient Money Flow Divergence Detector indicator provides a comprehensive look at market momentum and volume-weighted price movement by combining a color-graded Money Flow Index (MFI) with multi-timeframe divergence detection. This tool allows traders to identify potential trend reversals and strength shifts across four distinct lookback horizons—micro, sub-mid, mid, and macro—while visually tracking overbought and oversold conditions.

Usage

The tool is primarily used to identify market exhaustion and trend changes through price/oscillator discrepancies.

  • Divergence Analysis: The script automatically identifies bullish and bearish divergences across four sensitivity levels. Bullish signals appear when price makes a lower low while the MFI makes a higher low; bearish signals appear when price makes a higher high while the MFI makes a lower high.
  • Gradient Money Flow: The main line changes color based on the current MFI value relative to its recent range, providing a visual cue of the buying or selling pressure intensity.
  • Threshold Monitoring: Use the 80 and 20 horizontal levels to identify overbought or oversold conditions. A move above 80 suggests a potential top, while a drop below 20 suggests a potential bottom.
  • Confluence: When multiple divergence lookbacks (e.g., Micro and Macro) trigger simultaneously, it indicates a stronger potential for a trend reversal.

Details

The indicator calculates the standard Money Flow Index using price and volume data. Unlike standard oscillators, the gradient implementation normalizes the MFI value within its recent lookback period to determine the line's color, helping to distinguish between absolute values and relative momentum.

The divergence logic uses pivot points to identify peaks and troughs in both price and the MFI. By checking for these conditions across four different lookback settings (Micro, Sub-Mid, Mid, and Macro), the tool captures everything from short-term scalping opportunities to major structural shifts.

Settings

  • Length: The period used to calculate the Money Flow Index.
  • Micro Div Lookback: Pivot lookback for identifying very short-term divergences.
  • Sub-Mid Div Lookback: Pivot lookback for identifying intermediate-short divergences.
  • Mid Div Lookback: Pivot lookback for identifying medium-term divergences.
  • Macro Div Lookback: Pivot lookback for identifying long-term structural divergences.

FAQ

How do I interpret the different colored divergence signals?

The colors are used to distinguish between bullish (green) and bearish (red) signals across the various lookback periods. These signals indicate when the price trend is losing momentum relative to volume flow.

Can I set alerts for these divergences?

Yes, the script includes alert conditions for both bullish and bearish divergences across any of the lookback periods, as well as crosses of the overbought (80) and oversold (20) levels.

How do I access this indicator?

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.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.