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
Settings set how many bars back removal of invalidated zones begins, how much history is kept after invalidation, and a tolerance margin. A long term mode keeps more zones. Algorithm modes range from looser to strict engulfing, and break, retest and choppy zones have their own cap. It highlights areas only and has no trade rules.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Auto Max # of Engulfing (Futures and Extended Hours Instrument)?
string
Auto
mode_auto_engulfing
Algo Mode? (III = I & II, IV = Strict Engulfing)
string
I
mode_algo
Theshold of Mode II for Big vs Small Candle
float
1.25
mode_algo2_threshold
Max Bar Back
int
450
maxBarsBack
How many bar back to start removal of invalid zone (invalidation)
int
8
_invalidation
History Zone to Keep from invalidation
int
5
zonehist
Zone toterance (margin if error)
int
5
tolerance
Max # of Zone
int
25
_maxNumberOfEngulfings
Max # of Zone (breakretest/choppy)
int
50
maxNumberOfEngulfings2
Long Term Mode (more zone)
bool
false
mode_lt
Long Term Percent Increase Zone
int
50
mode_lt_pct
Long Term Percent Increase Invalidation
int
150
mode_invalidation_pct
Show all 40 settings
Setting
Type
Default
Variable
Flip Fill Color
bool
false
flipcolor
Flip Fill Neutral Color
bool
true
flipneutralcolor
Bullish Fill (A)
color
#004d40
bullFillcolor
Bullish Fill (B)
color
#166356
bullFillcolor2
Bearish Fill (A)
color
#a86161
bearFillcolor
Bearish Fill (B)
color
#be7777
bearFillcolor2
Bearish Box
color
color.red
bearboxcolor
Bullish Box
color
color.green
bullboxcolor
Break/Retest/Choppy Bull Fill
color
#7DF9FF
neutralbullFillcolor
Break/Retest/Choppy Bear Fill
color
#FC74FD
neutralbearFillcolor
Neutral Box (with retest/choppy)
color
color.olive
neutralbullboxcolor
Neutral Box (with retest/choppy)
color
color.gray
neutralbearboxcolor
Fill Transparency (A)
int
60
filltransp
Fill Transparency (B)
int
40
filltranspa
Fill Transparency (break/retest/choppy) (A)
int
75
filltransp2
Fill Transparency (break/retest/choppy) (B)
int
90
filltransp2a
Box Transparency
int
80
boxtransp
Box Transparency (break/etest/choppy)
int
80
boxtransp2
Line Width
int
1
linewidth
Line Width (break/retest/choppy)
int
1
linewidth2
S/D Candle Number of bar back to search (Zone Display)
int
1
loopback
S/D Candle Number of bar back to search (Bar Paint)
int
1
loopback2
S/D Candle ratio of Body vs Candle to consider
float
0.25
rbody
S/D Candle ratio of Body vs Candle (for reversal bar)
float
0.60
rbody2
S/D Candle threshold to draw zone
float
0.30
rbody3
S/D candle with pinbar mode? (close at top or bottom)
bool
false
mode_pinbar
Demand Bar Candle
color
color.yellow
demandbarcandle
Supply Bar Candle
color
color.fuchsia
supplybarcandle
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 overlays up to five higher-timeframe candlestick groups on the price chart. For each enabled timeframe it requests open, high, low, and close and can show up to five candles, offset by a spacing setting. The main inputs set the candle count, the
This indicator plots optional candlestick pattern signals on the price chart. It detects engulfing bars, inside bars, HOLP and LOHP, kicker patterns, body-mass extremes, higher highs and lower lows, ATR warnings, and four-bar fractals. Optional pivot marks use
The Strat Assistant indicator identifies candlestick patterns from the STRAT methodology on the price chart. It detects inside bars, 2-candle directional bars, 3-candle outside bars, and sequences like 212 and 222 for continuations and reversals. Shapes such a
This overlay indicator highlights candles with a body smaller than 50% of their total range by coloring them white on the price chart. Simultaneously, it calculates and plots horizontal lines for open prices across multiple higher timeframes, such as daily, we
This Pine Script indicator identifies liquidity sweeps and confirms signals using a close-back candle pattern directly on the price chart. It tracks recent swing highs and lows over a customizable lookback period. A bullish signal forms when a prior bar sweeps
This overlay indicator draws 80/20 price levels and optional 40-point zone bands on the price chart. It marks repairs, cross sections, and forks with optional letter labels, and can highlight confluence when those marks sit near a level. Separate options shade