This indicator plots an overlay version of the MACD directly on the main price chart alongside optional Zigzag multi-depth calculations and pivot analysis.
1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
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.
Overlay MACD visual panel on main price chart
Multiple MACD calculation methods including Leader and Source
Multi-depth Zigzag lines and pivot detection
Customizable oscillator height and vertical position
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
MACD Calculation Method
string
MACD-SOURCE
macdType
Fast Length
int
12
fast_length
Slow Length
int
26
slow_length
Source
source
close
source
Signal Smoothing
int
9
signal_length
Oscillator MA Type
string
EMA
sma_source
Signal Line MA Type
string
EMA
sma_signal
Display MACD/Signal Corsses
bool
true
macdSigCross
Highlight MACD/Signal Area
bool
true
highlight
Overlay Indicator Display Length
int
200
lookbackLength
Placement
string
Bottom
oscPlacement
Hight
int
10
Hight
Show all 40 settings
Setting
Type
Default
Variable
Vertical Indicator Position
int
4
verticalAdj
openSource
source
open
openSource
highSource
source
high
highSource
lowSource
source
low
lowSource
closeSource
source
close
closeSource
useZigzag1
bool
true
useZigzag1
zigzagLength1
int
8
zigzagLength1
depth1
int
55
depth1
useZigzag2
bool
false
useZigzag2
zigzagLength2
int
13
zigzagLength2
depth2
int
34
depth2
useZigzag3
bool
false
useZigzag3
zigzagLength3
int
21
zigzagLength3
depth3
int
21
depth3
useZigzag4
bool
false
useZigzag4
zigzagLength4
int
34
zigzagLength4
depth4
int
13
depth4
Number of Pivots
int
5
numberOfPivots
Error Threshold
float
20.0
errorThresold
Flat Threshold
float
20.0
flatThreshold
Last Pivot Direction
string
both
lastPivotDirection
Verify Bar Ratio
bool
true
checkBarRatio
barRatioLimit
float
0.382
barRatioLimit
Avoid Overlap
bool
true
avoidOverlap
Repaint
bool
false
repaint
Channels
bool
true
allowChannels
Wedge
bool
true
allowWedges
Triangle
bool
true
allowTriangles
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.
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
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
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
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
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
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,