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.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
📈 Stop guessing your settings — backtest & optimize with QuantPilot
🎁 Free to start
🎁 Free to start
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
📈 Stop guessing your settings — backtest & optimize with QuantPilot
🎁 Free to start
🎁 Free to start
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。