OPEN-SOURCE SCRIPT
Auto Structure Lines

Auto Structure Lines automatically detects recent swing highs and swing lows, then plots clean support and resistance levels on the chart. It is designed to help traders quickly identify nearby structure, breakout areas, rejection zones, and possible pullback levels without manually drawing every line.
The indicator uses confirmed pivot highs and lows to create resistance and support lines. Nearby levels are merged using an ATR-based tolerance so the chart stays cleaner and avoids stacking multiple lines around the same price area.
Key features:
Automatically detects pivot-based support and resistance
Extends structure lines to the right side of the chart
Stores multiple historical levels while showing only the most recent visible levels
ATR-based level merging to reduce clutter
Optional price labels for each visible level
Customizable pivot length, line style, colors, width, and label offset
Separate toggles for support and resistance
This tool is useful for identifying important price areas, planning breakout entries, watching retests, and managing risk around nearby support or resistance.
Auto Structure Lines is a visual decision-support tool. It does not generate buy or sell signals by itself and should be used with price action, volume, trend context, and your own risk management.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。