OPEN-SOURCE SCRIPT
Auto Trend Lines + Signals + Supertrend

Auto Trend Lines + Signals + Supertrend — a TradingView indicator that combines three tools in one overlay.
Macro Trend
Detects significant pivot highs and lows using wide lookback windows (default: 10 bars left, 5 right). Connects consecutive lower highs into a resistance trendline (red) and higher lows into a support trendline (green). All lines accumulate on the chart, preserving the full history of trend levels. Options: wick or body pivots, log scale, forward extension, color and style.
Micro Trend
Same logic on a shorter scale (default: 4 left, 2 right) — catches smaller waves within the macro move. Drawn as dotted lines by default to distinguish them visually from macro lines.
Trendline Signals
When price crosses a trendline, a marker appears:
B (large, cyan) — Strong Buy: price broke above a macro resistance line
S (large, red) — Strong Sell: price broke below a macro support line
b (small, green) — Weak Buy: price broke above a micro resistance line
s (small, orange) — Weak Sell: price broke below a micro support line
Supertrend
Standard Supertrend based on ATR × multiplier. The line trails below price in an uptrend and above price in a downtrend, changing color on direction flips. Small circles mark each flip. Default settings: ATR period 10, multiplier 3.0 — both adjustable.
Alerts
Six individual alert conditions (Strong Buy, Strong Sell, Weak Buy, Weak Sell, ST Buy, ST Sell) plus two combined ones — "Any TL Signal" and "Any ST Signal".
Macro Trend
Detects significant pivot highs and lows using wide lookback windows (default: 10 bars left, 5 right). Connects consecutive lower highs into a resistance trendline (red) and higher lows into a support trendline (green). All lines accumulate on the chart, preserving the full history of trend levels. Options: wick or body pivots, log scale, forward extension, color and style.
Micro Trend
Same logic on a shorter scale (default: 4 left, 2 right) — catches smaller waves within the macro move. Drawn as dotted lines by default to distinguish them visually from macro lines.
Trendline Signals
When price crosses a trendline, a marker appears:
B (large, cyan) — Strong Buy: price broke above a macro resistance line
S (large, red) — Strong Sell: price broke below a macro support line
b (small, green) — Weak Buy: price broke above a micro resistance line
s (small, orange) — Weak Sell: price broke below a micro support line
Supertrend
Standard Supertrend based on ATR × multiplier. The line trails below price in an uptrend and above price in a downtrend, changing color on direction flips. Small circles mark each flip. Default settings: ATR period 10, multiplier 3.0 — both adjustable.
Alerts
Six individual alert conditions (Strong Buy, Strong Sell, Weak Buy, Weak Sell, ST Buy, ST Sell) plus two combined ones — "Any TL Signal" and "Any ST Signal".
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.