OPEN-SOURCE SCRIPT
Multi Trend Filter

Overview
Multi Trend Filter shows the market's underlying trend with a single, clean line. It uses the Daily timeframe as the base, then layers 4H and 30m confirmation on top, coloring the trend in three intuitive states: green / yellow / red. No matter which chart timeframe you view it on (15m, 1h, 4h, etc.), it stays consistent on the Daily basis, and a two-pass smoothing keeps the line smooth on any chart.
WHAT THE COLORS MEAN
Green (UPTREND): Uptrend confirmed.
Yellow (TRANSITION): Trend is shifting — awaiting confirmation.
Red (DOWNTREND): Downtrend confirmed.
HOW IT WORKS — 3-STAGE MULTI-TIMEFRAME CONFIRMATION
Set the broad direction with higher timeframes first, then confirm the entry with the lower timeframe last.
Daily (Base / Reference line) — the line drawn on the chart; the anchor of the larger trend.
4H (Primary confirmation) — when both the close and the 4H flow align above/below the Daily line, the base direction is set.
30m (Final confirmation) — in that base direction, once the candle body closes across the 30m line, the color is finalized:
Close closes ABOVE the 30m line → Green
Close closes BELOW the 30m line → Red
Yellow (Transition) is the period before both stages confirm — the 4H hasn't committed yet, or it has but the close hasn't cleared the 30m line. Once green/red is confirmed, the color ignores minor noise while the base holds (latch), so it won't flicker.
HOW TO READ IT
Green: uptrend intact. Look for pullback entries.
Red: downtrend intact. Look for bounce exits / stay aside.
Yellow: direction unclear; safer to wait until it confirms green/red.
Yellow to Green = bullish shift. Yellow to Red = bearish shift.
KEY SETTINGS
Trend Line — First / Second Smoothing Length: line smoothness and responsiveness.
Display Smoothing — Smooth Line, Smooth Strength: keeps the line smooth on any timeframe (higher = smoother, slightly more lag).
Confirmation Lines — Show 30m Line (Signal) / Show 4H Line (Base): reveal the lines used for confirmation.
Style — up/down/transition colors, line width, fill and transparency, trend label.
TIPS
Use it as a trend direction and shift filter, not a standalone trade signal.
Reliability increases when the trend color agrees with your own setup (support/resistance, volume, etc.).
If the line looks choppy, raise Smooth Strength.
DISCLAIMER
This indicator is a reference tool to help judge trend direction. It does not guarantee trading profits. All trading decisions and responsibility rest solely with the user.
Multi Trend Filter shows the market's underlying trend with a single, clean line. It uses the Daily timeframe as the base, then layers 4H and 30m confirmation on top, coloring the trend in three intuitive states: green / yellow / red. No matter which chart timeframe you view it on (15m, 1h, 4h, etc.), it stays consistent on the Daily basis, and a two-pass smoothing keeps the line smooth on any chart.
WHAT THE COLORS MEAN
Green (UPTREND): Uptrend confirmed.
Yellow (TRANSITION): Trend is shifting — awaiting confirmation.
Red (DOWNTREND): Downtrend confirmed.
HOW IT WORKS — 3-STAGE MULTI-TIMEFRAME CONFIRMATION
Set the broad direction with higher timeframes first, then confirm the entry with the lower timeframe last.
Daily (Base / Reference line) — the line drawn on the chart; the anchor of the larger trend.
4H (Primary confirmation) — when both the close and the 4H flow align above/below the Daily line, the base direction is set.
30m (Final confirmation) — in that base direction, once the candle body closes across the 30m line, the color is finalized:
Close closes ABOVE the 30m line → Green
Close closes BELOW the 30m line → Red
Yellow (Transition) is the period before both stages confirm — the 4H hasn't committed yet, or it has but the close hasn't cleared the 30m line. Once green/red is confirmed, the color ignores minor noise while the base holds (latch), so it won't flicker.
HOW TO READ IT
Green: uptrend intact. Look for pullback entries.
Red: downtrend intact. Look for bounce exits / stay aside.
Yellow: direction unclear; safer to wait until it confirms green/red.
Yellow to Green = bullish shift. Yellow to Red = bearish shift.
KEY SETTINGS
Trend Line — First / Second Smoothing Length: line smoothness and responsiveness.
Display Smoothing — Smooth Line, Smooth Strength: keeps the line smooth on any timeframe (higher = smoother, slightly more lag).
Confirmation Lines — Show 30m Line (Signal) / Show 4H Line (Base): reveal the lines used for confirmation.
Style — up/down/transition colors, line width, fill and transparency, trend label.
TIPS
Use it as a trend direction and shift filter, not a standalone trade signal.
Reliability increases when the trend color agrees with your own setup (support/resistance, volume, etc.).
If the line looks choppy, raise Smooth Strength.
DISCLAIMER
This indicator is a reference tool to help judge trend direction. It does not guarantee trading profits. All trading decisions and responsibility rest solely with the user.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.