Indicator · Pine Script v5 · On the chart

MACD-X Overlay, More Than MACD by DGT

by webcrack4

This indicator plots an overlay version of the MACD directly on the main price chart alongside optional Zigzag multi-depth calculations and pivot analysis.

View on GitHub

Repaints

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code1,506
Settings40inputs
LicenceNone stated
Last update9 months ago10 Jan 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

MACD-X Overlay, More Than MACD by DGT calculates traditional, histogram-based, leader, or source-based MACD oscillators and displays signal line crossovers with highlighted background areas. Users can adjust MACD lengths, smoothing methods, vertical positioning, and Zigzag depth settings. Because it utilizes Zigzag and pivot features, historic points may repaint as new price data develops.

Details

Published by

webcrack4 on GitHub

Type

Indicator, Pine Script v5

Draws

On the price chart

Category

Oscillators & momentum, Trend, Support & resistance

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

  • Signals can change on the live bar or after it closes (repainting)

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
MACD Calculation MethodstringMACD-SOURCEmacdType
Fast Lengthint12fast_length
Slow Lengthint26slow_length
Sourcesourceclosesource
Signal Smoothingint9signal_length
Oscillator MA TypestringEMAsma_source
Signal Line MA TypestringEMAsma_signal
Display MACD/Signal CorssesbooltruemacdSigCross
Highlight MACD/Signal Areabooltruehighlight
Overlay Indicator Display Lengthint200lookbackLength
PlacementstringBottomoscPlacement
Hightint10Hight
Show all 40 settings
SettingTypeDefaultVariable
Vertical Indicator Positionint4verticalAdj
openSourcesourceopenopenSource
highSourcesourcehighhighSource
lowSourcesourcelowlowSource
closeSourcesourceclosecloseSource
useZigzag1booltrueuseZigzag1
zigzagLength1int8zigzagLength1
depth1int55depth1
useZigzag2boolfalseuseZigzag2
zigzagLength2int13zigzagLength2
depth2int34depth2
useZigzag3boolfalseuseZigzag3
zigzagLength3int21zigzagLength3
depth3int21depth3
useZigzag4boolfalseuseZigzag4
zigzagLength4int34zigzagLength4
depth4int13depth4
Number of Pivotsint5numberOfPivots
Error Thresholdfloat20.0errorThresold
Flat Thresholdfloat20.0flatThreshold
Last Pivot DirectionstringbothlastPivotDirection
Verify Bar Ratio booltruecheckBarRatio
barRatioLimitfloat0.382barRatioLimit
Avoid OverlapbooltrueavoidOverlap
Repaintboolfalserepaint
ChannelsbooltrueallowChannels
WedgebooltrueallowWedges
TrianglebooltrueallowTriangles
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

114 stars

This indicator calculates key support and resistance levels by analyzing the first and second momentum derivatives of a Double Exponential Moving Average (DEMA). When the second derivative (momentum of momentum) crosses zero, it identifies local turning points

Indicator v4 Support & resistanceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Support and Resistance Levels

Moon Dev Lunar Sniper

by moondevonyt
92 stars

Moon Dev Lunar Sniper is a multi-indicator overlay that scores confluence across fast and slow EMAs, RSI, MACD, DMI, and BB width to fire signals only when score meets the minimum threshold. It plots buy and sell signals on the price chart, highlights cosmic b

Indicator v6 TrendOscillators & momentum Repaints
Updated 8 weeks ago · Custom licence GitHub repository of Moon Dev Lunar Sniper
14 stars

Self-Aware Trend System calculates volatility-adaptive ATR trailing bands using a Trend Quality Index engine that evaluates market efficiency, momentum persistence, and structural pivots. It plots adaptive trend bands and character-flip trend signals directly

Indicator v6 TrendVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Self-Aware Trend System [WillyAlgoTrader]

SPY 0DTE Scalper - 15min

by chris-c-thomas
14 stars

This intraday overlay establishes directional bias and high-conviction swing setups for SPY on the 15-minute timeframe. It computes a weighted confluence score combining an EMA ribbon, a 50 EMA anchor, session VWAP bands, RSI divergence, ADX, TTM Squeeze, cand

Indicator v6 TrendOscillators & momentum
Updated 6 months ago · MIT GitHub repository of SPY 0DTE Scalper - 15min

Market Trend

by azamiftikhar1000
12 stars

Market Trend is an overlay indicator that identifies market direction and key price levels. It calculates a Relative Strength Index with Bollinger Bands to construct a 20-step color gradient reflecting momentum shifts. The script incorporates exponential movin

Indicator v4 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Market Trend

BTE Acc AO SMIO

by f-cksociety
11 stars

This script provides an indicator-based backtesting engine framework that simulates trade entries, exits, and filtering directly on the price chart. It evaluates selected entry rules and multi-layered filters, including moving average trends, volume increases,

Indicator v5 TrendOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of BTE Acc AO SMIO

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers