PROTECTED SOURCE SCRIPT
[Top] Trend Lines with Strength Detection

The Auto Trend Lines with Strength Detection indicator automatically detects and draws dynamic support and resistance lines based on pivot highs and lows. These trend lines adapt to market structure in real time, increasing in opacity as they accumulate additional touches. Numbers are also printed above each line indicating the number of times that line has been tested and held.
Unlike most trend line indicators, this one does not consider a brief wick to have broken the line. Nor does it break the line if the current candle is testing it. The candle must fully close on the oppose side of a trend line for this indicator to remove that line.
On the chart above you can see that the current candle is in the process of breaking the two resistance lines. If the candle closes above the lines, they will be broken and removed from the chart. If it's not able to close above the resistance lines, they will remain intact and accumulate another touch point.
Key features include:
⸻
Potential Uses:
Unlike most trend line indicators, this one does not consider a brief wick to have broken the line. Nor does it break the line if the current candle is testing it. The candle must fully close on the oppose side of a trend line for this indicator to remove that line.
On the chart above you can see that the current candle is in the process of breaking the two resistance lines. If the candle closes above the lines, they will be broken and removed from the chart. If it's not able to close above the resistance lines, they will remain intact and accumulate another touch point.
Key features include:
- Pivot-based detection: Lines are drawn between valid swing points while filtering out intermediate price violations.
- Strength visualization: Each time price comes into proximity with a trend line, the “touch count” is incremented and both the line and its label darken accordingly.
- Break handling: Lines are automatically removed once the body of a candle closes beyond them, reducing clutter from broken levels.
- Customization options: Users can adjust pivot sensitivity, maximum lines to retain, line styles, widths, and colors independently for support and resistance.
- Pivot History: You can decide how far back you want the script to look for valid trends.
⸻
Potential Uses:
- Identifying strong support/resistance zones: As trend lines accumulate touches, they become visually stronger, helping traders spot high-confluence levels.
- Breakout and breakdown filtering: Detects and removes invalidated trend lines only after a full candle body breach, reducing false breakouts caused by wicks.
- Trend structure analysis: Helps visualize emerging or weakening trends by observing how support/resistance lines evolve and how price interacts with them.
- Strategy development: Can be used as a component in breakout, mean-reversion, or range-based trading systems.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.
Skrip dilindungi
Skrip ini diterbitkan sebagai sumber tertutup. Akan tetapi, anda boleh menggunakannya dengan percuma dan tanpa had – ketahui lebih lanjut di sini.
Penafian
Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.