1Copy the scriptPress Copy script above, or the copy button on the code below.
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
320 lines of Pine Script v6 from strategies/strategies6/Algo.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Algo calculates zone thickness using an Average True Range (ATR) multiplier and supports pivot detection from standard prices or Heikin Ashi bars. Key settings adjust the left and right pivot lookback periods, maximum zone width percentage, zone alignment, and visual styling. It renders bullish and bearish reaction zones as colored boxes on historical and current price action.
Pivot-based support and resistance zone detection
ATR-scaled dynamic zone width calculation
Selectable pivot sources including Heikin Ashi
Customizable pivot lookback and zone alignment options
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Look Left
int
20
left
Look Right
int
15
right
Number of Pivots
int
4
nPiv
ATR Length
int
30
atrLen
Zone Width (ATR)
float
0.5
mult
Max Zone Percent
float
5
per
Max Boxes for Patterns
float
10
max
Source For Pivots
string
HA
src
Align Zones
bool
true
alignZones
Extend Right
bool
false
extend
Show Level Labels
bool
false
lLab
Detect Pivot Highs
bool
true
dhighs
Show all 24 settings
Setting
Type
Default
Variable
Detect Pivot Lows
bool
true
dlows
Lookback For Breaks
int
2
lookback
swing High/Low
int
5
swing
Significant High/Low
int
10
reflect
Consider Bar From High/Low
int
1
offset
bullBorder
color
color.new(AQUA_COLOR, 60)
bullBorder
bullBgCol
color
color.new(AQUA_COLOR, 95)
bullBgCol
bearBorder
color
color.new(PINK_COLOR, 60)
bearBorder
bearBgCol
color
color.new(PINK_COLOR, 95)
bearBgCol
Long Length
int
25
long
Short Length
int
5
short
Signal Length
int
14
signal
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 overlay indicator marks ICT liquidity void fills on the price chart and can show long and short signals. It places a Fibonacci level inside a displacement candle, defaulting to the midpoint, and draws lines in a chosen style. Optional filters limit the fi
This indicator plots Donchian Channel boundary lines along with dynamic fan projections directly on the price chart. It calculates the highest high, lowest low, and median price over a customizable lookback period. Whenever price establishes a new channel high
This indicator plots a custom Anchored Volume-Weighted Average Price (VWAP) directly on the price chart along with optional standard deviation bands. Users can anchor the VWAP to standard time periods like sessions, weeks, or months, or to corporate events suc
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
Dynamic Linear Regression calculates and plots linear regression trendlines and standard deviation channels directly on the price chart over a user-selected time period. Traders can configure static channels locked at the end time, dynamic channels that contin
This indicator overlays trend-following Supertrend bands on the price chart using Average True Range calculations. It plots trailing stop lines, highlights active trend directions, and prints buy or sell shape labels when price closes across band thresholds. I