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.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。