MTF Trend Alignment (D/4H/1H/30M/M15/M5)MTF Trend Alignment (D/4H/1H/30M/M15/M5)
A multi-timeframe trend dashboard combined with real-time market structure labels, built entirely on price action — no lagging indicators, no EMAs, no oscillators.
How the Dashboard Works
The dashboard displays trend direction across six timeframes: Daily, 4 Hour, 1 Hour, 30 Minute, 15 Minute, and 5 Minute. Trend is determined using a protected-level structural break method rooted in Smart Money Concepts (SMC) and ICT methodology.
When price closes above a confirmed swing high, the trend is set to bullish and the most recent swing low becomes the "protected low." The trend remains bullish through pullbacks, minor dips, and noise — it only flips to bearish when a candle body closes below that protected low. As the trend progresses and new swing highs form, the protected low trails upward to the most recent swing low, tightening the structure. The same logic applies in reverse for bearish trends with a protected high.
This approach filters out false signals caused by minor retracements. A pullback within a trend does not flip the dashboard — only a genuine structural break does.
How the Labels Work
On the chart timeframe, the indicator detects confirmed swing highs and swing lows using a configurable pivot lookback length. Each new swing is compared to the previous swing of the same type using the candle body close (not the wick) to classify it as HH (Higher High), LH (Lower High), HL (Higher Low), or LL (Lower Low).
Dashed horizontal lines extend from each swing level and remain on the chart until price closes through them, at which point they are automatically removed. Labels stay anchored to the right edge of the line for clean readability.
The labels show micro-structure (what individual swings are doing), while the dashboard shows the macro trend (overall direction). It is normal to see LL labels during a pullback within a bullish trend — the dashboard will remain bullish as long as the protected low holds.
Key Features
Pure price action trend detection across 6 timeframes with no lagging indicators
Protected-level structural break logic (standard ICT/SMC methodology) — trend only flips on confirmed CHoCH (Change of Character)
HH/HL/LH/LL labels with auto-extending dashed lines that remove themselves when broken
Close-based classification — candle body determines structure, not wicks
Configurable pivot lookback length, max labels, and structure history depth
Full alignment detection with optional background highlight and alert when all 6 timeframes agree
Dashboard repositioning (Top Right, Top Left, Bottom Right, Bottom Left)
Lightweight: only 6 request.security() calls total
Inputs
Pivot Lookback Length: Number of bars left and right required to confirm a swing point. Lower values detect more swings (more reactive), higher values detect only significant structure (smoother).
Max Recent Labels: Limits how many HH/HL/LH/LL labels appear on the chart at once.
Structure History: Only draws labels and lines within this many recent bars, keeping the chart clean.
Show Alert Only When All Aligned: Enables a background color highlight and triangle signal when all 6 timeframes agree on direction.
How to Use
Look for confluence. When the dashboard shows all or most timeframes aligned in the same direction, that is a higher-probability environment for entries in that direction. Use the chart-level labels to identify structure and key levels for entries and stops. The protected low (in a bullish trend) or protected high (in a bearish trend) serves as the structural invalidation level.
This indicator does not generate buy or sell signals. It provides structural context and multi-timeframe alignment awareness to support your own trading decisions.
Индикатор Pine Script®






















