GFG MACD Pivot Lines by Agaam

May 28, 2026

Static chart image
Support and Resistance
Oscillators
Pivot Based (Retrospective)

The GFG MACD Pivot Lines indicator by Agaam identifies support and resistance levels by detecting turning points in MACD momentum rather than standard price action alone. This tool provides a unique perspective on market structure by projecting horizontal price levels from candles where MACD pivots are confirmed.

Usage

The Usage section describes how the script can be used to identify potential reaction zones based on momentum shifts. Users can utilize the green support lines to identify areas where bullish momentum previously initiated, potentially acting as entry points or bounce zones. Conversely, red resistance lines highlight where bearish momentum began, serving as potential rejection areas or targets for short positions.

The script allows users to customize the source of the pivot detection. For example, using the MACD Histogram may result in more frequent, sensitive pivots, while using the MACD Line or Signal Line often yields more significant, long-term structural levels.

Details

The indicator functions by monitoring a chosen MACD source (Histogram, Line, or Signal) for pivot highs and lows based on a user-defined "Left" and "Right" bar confirmation period. Because these are confirmed pivots, the script waits for a specified number of bars (Right Bars) to close before identifying the turning point. Once confirmed, the script draws a horizontal line starting from the historical pivot candle and extends it forward.

Bullish pivots are marked when the MACD source forms a trough, and bearish pivots are marked when it forms a peak. Users can also apply zero-line filters to ensure only "oversold" bullish pivots (below zero) or "overbought" bearish pivots (above zero) are displayed.

Settings

MACD Settings

  • Source: The price data source used to calculate the MACD.
  • MACD Fast/Slow/Signal Length: Standard parameters for the MACD calculation.
  • MACD Pivot Source: Determines which part of the MACD (Histogram, Line, or Signal Line) is used to detect pivots.
  • Pivot Left/Right Bars: The number of bars required before and after a point to confirm it as a pivot.

MACD Filters

  • Bull Pivot Only Below Zero: When enabled, only bullish pivots occurring while the MACD source is negative will be drawn.
  • Bear Pivot Only Above Zero: When enabled, only bearish pivots occurring while the MACD source is positive will be drawn.

Price Level

  • Price Level From: Determines if the horizontal line is drawn at the candle's Wick (High/Low) or Close.
  • Show Bull/Bear MACD Pivot Lines: Toggles the visibility of the respective levels.
  • Show Current Pivot Only Per Side: If enabled, only the most recent line for each side is displayed.
  • Extend Lines Right: Sets the length of the projected horizontal lines.

Visuals

  • Colors (Bull/Bear/Label): Customizes the aesthetic appearance of the lines and labels.
  • Line Width/Style: Adjusts the thickness and pattern (Solid, Dashed, Dotted) of the pivot lines.
  • Show Labels: Toggles price labels at the end of the pivot lines.
  • Label Offset/Size: Adjusts the position and scale of the price labels.

FAQ

How do I interpret the lag in line appearance? MACD pivots require a "Right Bars" confirmation period to ensure the turning point is valid. The line will appear on the chart only after the confirmation bars have closed, but it will be anchored to the historical candle where the pivot actually occurred.

Can I change which part of the MACD determines the levels? Yes, you can toggle between the MACD Histogram, the MACD Line, or the Signal Line in the "MACD Pivot Source" dropdown menu within the settings.

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 access on the following platforms
tradingviewSymbolTradingView
ninjatraderNinjaTrader
metatrader4MetaTrader 4/5
thinkorswimThinkorswim

Unlock Unlimited Access to the LuxAlgo Library

Upgrade your plan to get all indicators, strategies, charts, and full access to Quant, our AI agent.

Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.

Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.

Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.

Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.

This does not represent our full Disclaimer. Please read our full disclaimer.

© 2026 LuxAlgo Global, LLC.