OPEN-SOURCE SCRIPT
Auto Trendlines

Auto Trendline – Indicator Description
The Auto Trendline indicator automatically draws trendlines based on recent swing highs and lows using pivot analysis. It helps traders quickly identify short-term and long-term market trends without manual drawing.
✅ Features:
Automatic drawing of trendlines based on pivot points (highs and lows)
Custom timeframe support: Use higher timeframe pivot data while working on lower charts
Trendlines update dynamically as new pivots are formed
Lines extend only to the current bar, keeping the chart clean
⚙️ How It Works:
The indicator detects recent swing highs and lows using pivot strength
Two most recent pivot points are connected to form each trendline:
Uptrend line from two higher lows
Downtrend line from two lower highs
Trendlines are redrawn as new pivots appear
The Auto Trendline indicator automatically draws trendlines based on recent swing highs and lows using pivot analysis. It helps traders quickly identify short-term and long-term market trends without manual drawing.
✅ Features:
Automatic drawing of trendlines based on pivot points (highs and lows)
Custom timeframe support: Use higher timeframe pivot data while working on lower charts
Trendlines update dynamically as new pivots are formed
Lines extend only to the current bar, keeping the chart clean
⚙️ How It Works:
The indicator detects recent swing highs and lows using pivot strength
Two most recent pivot points are connected to form each trendline:
Uptrend line from two higher lows
Downtrend line from two lower highs
Trendlines are redrawn as new pivots appear
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.