ZigZag OrderBlock Retracement plots multi-layer ZigZag swing structures, order blocks, breaker blocks, and optimal trade entry (OTE) zones directly on the price chart.
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
ZigZag OrderBlock Retracement supports up to four distinct ZigZag depth layers to analyze both short-term and long-term swings, with optional labels for higher highs, higher lows, lower highs, and lower lows. Main settings adjust swing lengths, toggle breaker block detection, customize line styles, and enable bar close confirmation. It acts as an analytical mapping tool with no trading signals.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Display
bool
true
showZZ1
Length
int
20
zzLength1
Bear
color
COLOR_BEAR
zzBearCol1
Bull
color
COLOR_BULL
zzBullCol1
Range
color
COLOR_RANGE
zzRangeCol1
Display
bool
true
showZZ2
Length
int
40
zzLength2
Bear
color
COLOR_BEAR
zzBearCol2
Bull
color
COLOR_BULL
zzBullCol2
Range
color
COLOR_RANGE
zzRangeCol2
Display
bool
false
showZZ3
Length
int
75
zzLength3
Show all 40 settings
Setting
Type
Default
Variable
Bear
color
COLOR_BEAR
zzBearCol3
Bull
color
COLOR_BULL
zzBullCol3
Range
color
COLOR_RANGE
zzRangeCol3
Display
bool
false
showZZ4
Length
int
125
zzLength4
Bear
color
COLOR_BEAR
zzBearCol4
Bull
color
COLOR_BULL
zzBullCol4
Range
color
COLOR_RANGE
zzRangeCol4
Line Style
enum
LineStyle.Solid
zzLineStyle
Line Width
int
1
zzLineWidth
Bar Coloring
bool
true
showBarColors
Display HH / HL / LH / LL
bool
false
showPivotType
Display Swing Ratio
bool
false
showPivotRatio
Display OTE Zone
bool
true
showOTE
Show Detection Labels
bool
true
showOBLabels
Wait for Bar Close
bool
true
confirmOnClose
Breaker Blocks
bool
true
showBreakers
Display Zones
bool
true
showLevels
Display Price Labels
bool
true
showLevelLbl
Resistance
color
COLOR_BEAR
resistanceCol
Support
color
COLOR_BULL
supportCol
Border Style
enum
LineStyle.Solid
levelStyle
Zone Transparency
float
75
zoneTransp
Display Dashboard
bool
true
showTable
Position
enum
TablePos.TopRight
tablePosition
Show Ranges
bool
true
showIPDA
60-Day Range
color
#1848CC
ipdaCol60
40-Day Range
color
#2962FF
ipdaCol40
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 detects equal highs and lows by comparing prices within user-defined left and right bars using a tolerance percentage. It plots horizontal lines on the price chart for equal highs in one color and lows in another. A screener allows input of mult
This Pine Script indicator plots a ZigZag on the price chart. It identifies reversal points when price moves more than a set percentage from the last pivot. The script calculates forecasts using zigzag data and labels detected geometric patterns including harm
This indicator plots market structure on the price chart by identifying swing highs and lows. It connects these points with lines to visualize trend direction and detect Break of Structure (BOS) when price breaks a prior swing in the current trend. Change of C
This indicator implements the Fractal Model concept to plot market structure shifts, liquidity sweeps, and Change in State of Delivery (CISD) levels. It overlays custom higher-timeframe candle previews, open prices, and time markers directly on the price chart
BigBeluga Smart Money Concepts identifies and overlays market structure and volumetric order blocks directly on the price chart. It analyzes market swings, trend sweeps, and mapping structure using customizable pivot lengths and calculation modes. The indicato
Apex Trend & Liquidity Master calculates a trend cloud using customizable moving averages expanded by a volatility multiplier directly on the main price chart. It identifies dynamic support and resistance liquidity zones from swing high and low pivots, extendi