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
Inputs limit pattern error, flatness, maximum retracement and optionally bar ratio, and an option avoids overlapping patterns. It draws pattern lines, pattern labels, pivot labels and the zigzag, with theme and size choices. A repaint switch is available, and pattern detection depends on chosen swing parameters. It imports several external libraries.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
openSource
source
open
openSource
highSource
source
high
highSource
lowSource
source
low
lowSource
closeSource
source
close
closeSource
useZigzag1
bool
true
useZigzag1
zigzagLength1
int
3
zigzagLength1
depth1
int
144
depth1
useZigzag2
bool
true
useZigzag2
zigzagLength2
int
5
zigzagLength2
depth2
int
89
depth2
useZigzag3
bool
true
useZigzag3
zigzagLength3
int
8
zigzagLength3
Show all 34 settings
Setting
Type
Default
Variable
depth3
int
55
depth3
useZigzag4
bool
true
useZigzag4
zigzagLength4
int
13
zigzagLength4
depth4
int
34
depth4
Error Threshold
float
20.0
errorThresold
Flat Threshold
float
20.0
flatThreshold
Max Retracement
float
0.618
flagRatio
Verify Bar Ratio
bool
false
checkBarRatio
barRatioLimit
float
0.382
barRatioLimit
Avoid Overlap
bool
true
avoidOverlap
Repaint
bool
false
repaint
Theme
enum
ut.Theme.DARK
theme
patternLineWidth
int
2
patternLineWidth
Pattern Label
bool
true
showPatternLabel
patternLabelSize
string
size.normal
patternLabelSize
Pivot Labels
bool
true
showPivotLabels
pivotLabelSize
string
size.normal
pivotLabelSize
Zigzag
bool
true
showZigzag
zigzagColor
color
color.blue
zigzagColor
Max Patterns
bool
true
deleteOldPatterns
maxPatterns
int
20
maxPatterns
Limit Bars
int
5000
limitBars
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.
Sideway Zones Live is an overlay indicator that estimates inner and outer sideways bands from recent highs and lows with a rational quadratic kernel. It tracks swing pivots over a loopback period and counts bars that remain between the outer high and low. Afte
This indicator identifies High Of Low Price (HOLP) and Low Of High Price (LOHP) candlestick setups based on price extremes over a specified lookback period. A HOLP signal triggers when the current bar closes above the high of a recent session low, whereas a LO
This indicator plots dynamic support and resistance levels on the price chart. It detects pivot highs and lows using the pivot length and tracks touches to build strength-based levels. Support and resistance zones appear as colored boxes while lines mark key l
This indicator calculates and plots Donchian Channels directly on the price chart. It determines the highest high and lowest low over a user-selected lookback period using an optimized monotonic deque algorithm, as well as a middle basis line computed as their
This indicator tracks bar lows during consecutive rising highs using Pine Script arrays. When at least four lows accumulate or the price breaches the minimum low in the stack, the script sorts the recorded lows in ascending order and flushes them. It plots up
This indicator tracks smart money market structure directly on the price chart. It calculates dual-period swing highs and swing lows to detect Changes of Character (CHoCH), Breaks of Structure (BOS), inducements, and liquidity sweeps. When structural levels ar