OPEN-SOURCE SCRIPT
Auto Support and Resistance [3Commas]

Auto Support and Resistance [3Commas]
This indicator maps market structure automatically. Instead of drawing levels by hand, it derives them from recent price action and volatility, then presents a single, consistent read of where price is trading, the zones around it, and the two most likely paths from here.
How it works (the method):
- Macro ceiling & floor — the highest high and lowest low over a configurable lookback window define the outer boundary of the current regime (Macro Resistance / Macro Support).
- Local decision levels — the indicator tracks confirmed swing pivots (a high or low with a set number of bars on each side) and selects the nearest significant pivot above and below price, ignoring any that hug the current price so the levels stay meaningful. These become the Local High / Decision and Local Low. Equilibrium marks the current price.
- Volatility-scaled zones — the Resistance, Support and Accumulation zones are sized from Average True Range (ATR), so they widen on volatile symbols and tighten on calm ones, staying meaningful across different assets and timeframes.
- Two scenario paths — from equilibrium the script projects a bullish and a bearish path as multi-leg zig-zags scaled to ATR, each ending at a target. You choose what the targets represent: an ATR-based measured move (default), the nearest local levels, or the macro boundary. Measured-move targets are capped to the macro range so they always stay on the chart.
How to use it:
1. Add it to any chart and timeframe. Levels, zones and paths populate automatically.
2. Tune detection in Settings: "Macro lookback" sets how far back the ceiling/floor is measured; "Swing sensitivity" controls how strong a pivot must be to count; "Min level distance", "Zone width" and "Scenario swing size" refine spacing; "Scenario target" picks what the arrows aim at.
3. Read it as a decision map: is price nearer the ceiling or the floor, which local level must break first, and which scenario path is in play.
Optional manual mode: turn "Auto-detect" off to enter your own levels, zones and targets — useful for presenting a pre-planned idea.
Colors: red = resistance/ceiling, blue = equilibrium/current price, green = support/floor. White = projected scenario paths.
This tool is for chart visualisation and educational purposes only and is not financial advice. It does not generate buy/sell signals.
This indicator maps market structure automatically. Instead of drawing levels by hand, it derives them from recent price action and volatility, then presents a single, consistent read of where price is trading, the zones around it, and the two most likely paths from here.
How it works (the method):
- Macro ceiling & floor — the highest high and lowest low over a configurable lookback window define the outer boundary of the current regime (Macro Resistance / Macro Support).
- Local decision levels — the indicator tracks confirmed swing pivots (a high or low with a set number of bars on each side) and selects the nearest significant pivot above and below price, ignoring any that hug the current price so the levels stay meaningful. These become the Local High / Decision and Local Low. Equilibrium marks the current price.
- Volatility-scaled zones — the Resistance, Support and Accumulation zones are sized from Average True Range (ATR), so they widen on volatile symbols and tighten on calm ones, staying meaningful across different assets and timeframes.
- Two scenario paths — from equilibrium the script projects a bullish and a bearish path as multi-leg zig-zags scaled to ATR, each ending at a target. You choose what the targets represent: an ATR-based measured move (default), the nearest local levels, or the macro boundary. Measured-move targets are capped to the macro range so they always stay on the chart.
How to use it:
1. Add it to any chart and timeframe. Levels, zones and paths populate automatically.
2. Tune detection in Settings: "Macro lookback" sets how far back the ceiling/floor is measured; "Swing sensitivity" controls how strong a pivot must be to count; "Min level distance", "Zone width" and "Scenario swing size" refine spacing; "Scenario target" picks what the arrows aim at.
3. Read it as a decision map: is price nearer the ceiling or the floor, which local level must break first, and which scenario path is in play.
Optional manual mode: turn "Auto-detect" off to enter your own levels, zones and targets — useful for presenting a pre-planned idea.
Colors: red = resistance/ceiling, blue = equilibrium/current price, green = support/floor. White = projected scenario paths.
This tool is for chart visualisation and educational purposes only and is not financial advice. It does not generate buy/sell signals.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
📈 Stop guessing your settings — backtest & optimize with QuantPilot
🎁 Free to start
🎁 Free to start
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
📈 Stop guessing your settings — backtest & optimize with QuantPilot
🎁 Free to start
🎁 Free to start
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.