OPEN-SOURCE SCRIPT
MTF Confirmed Swing Levels

# MTF Confirmed Swing Levels
MTF Confirmed Swing Levels is a multi-timeframe market structure indicator that automatically identifies confirmed swing highs and swing lows and marks them with horizontal lines.
The indicator calculates market structure separately for each selected timeframe. This means that a swing high visible on the 15-minute timeframe does not automatically become a swing high on the 1-hour timeframe. Every timeframe keeps its own independent structure.
## How It Works
A swing high is confirmed when the price forms a local high and then changes direction.
A swing low is confirmed when the price forms a local low and then changes direction.
The indicator uses candles on both sides of a potential turning point:
* “Candles Left” controls how many candles before the turning point are evaluated.
* “Candles Right” controls how many candles must form after the turning point before the swing is confirmed.
For example, with 2 candles left and 2 candles right, a swing high must be higher than the two candles before it and the two candles after it.
Because the swing requires confirmation, the line appears only after the selected number of right-side candles has closed. However, the line is placed at the original candle where the swing occurred.
## Supported Timeframes
The following timeframes can be enabled or disabled individually:
* Weekly
* Daily
* 4-hour
* 1-hour
* 30-minute
* 15-minute
* 5-minute
* 1-minute
Higher-timeframe and lower-timeframe swing levels can be displayed directly on the current chart.
For example, you can display 15-minute swing levels on a 1-hour chart, even when the 1-hour candle itself does not form a confirmed swing.
## Main Features
* Confirmed swing high and swing low detection
* Independent calculations for every timeframe
* Multi-timeframe swing levels on one chart
* Separate colors for swing highs and swing lows
* Adjustable line thickness
* Adjustable line style
* Adjustable horizontal line length
* Optional extension of levels indefinitely to the right
* Adjustable maximum number of visible lines
* Automatic removal of the oldest levels when the line limit is reached
## Suggested Settings
For faster and more sensitive market structure:
* Candles Left: 2
* Candles Right: 1
For balanced swing detection:
* Candles Left: 2
* Candles Right: 2
For larger and more significant market structure:
* Candles Left: 3
* Candles Right: 3
Lower values detect more swings but may create more market noise. Higher values produce fewer but generally more significant swing levels.
## Practical Uses
The indicator can help identify:
* Potential support and resistance
* Liquidity above swing highs and below swing lows
* Higher highs and higher lows
* Lower highs and lower lows
* Breaks of market structure
* Trend continuation areas
* Reversal zones
* Multi-timeframe confluence
* Possible entry, stop-loss and take-profit reference levels
## Important Notes
Swing levels are confirmed only after the required right-side candles have formed. This reduces premature signals but creates a natural confirmation delay.
Displaying very low timeframe levels on a much higher timeframe may produce many horizontal lines. For a cleaner chart, enable only the timeframes that are relevant to your trading strategy.
The amount of available lower-timeframe historical data may also depend on TradingView’s intrabar data limits and the user’s subscription plan.
This indicator does not provide automatic buy or sell signals. It is designed as a market structure and technical analysis tool.
Use it together with your own trading plan, risk management and confirmation criteria.
Disclaimer: This indicator is provided for educational and informational purposes only. It does not constitute financial advice.
MTF Confirmed Swing Levels is a multi-timeframe market structure indicator that automatically identifies confirmed swing highs and swing lows and marks them with horizontal lines.
The indicator calculates market structure separately for each selected timeframe. This means that a swing high visible on the 15-minute timeframe does not automatically become a swing high on the 1-hour timeframe. Every timeframe keeps its own independent structure.
## How It Works
A swing high is confirmed when the price forms a local high and then changes direction.
A swing low is confirmed when the price forms a local low and then changes direction.
The indicator uses candles on both sides of a potential turning point:
* “Candles Left” controls how many candles before the turning point are evaluated.
* “Candles Right” controls how many candles must form after the turning point before the swing is confirmed.
For example, with 2 candles left and 2 candles right, a swing high must be higher than the two candles before it and the two candles after it.
Because the swing requires confirmation, the line appears only after the selected number of right-side candles has closed. However, the line is placed at the original candle where the swing occurred.
## Supported Timeframes
The following timeframes can be enabled or disabled individually:
* Weekly
* Daily
* 4-hour
* 1-hour
* 30-minute
* 15-minute
* 5-minute
* 1-minute
Higher-timeframe and lower-timeframe swing levels can be displayed directly on the current chart.
For example, you can display 15-minute swing levels on a 1-hour chart, even when the 1-hour candle itself does not form a confirmed swing.
## Main Features
* Confirmed swing high and swing low detection
* Independent calculations for every timeframe
* Multi-timeframe swing levels on one chart
* Separate colors for swing highs and swing lows
* Adjustable line thickness
* Adjustable line style
* Adjustable horizontal line length
* Optional extension of levels indefinitely to the right
* Adjustable maximum number of visible lines
* Automatic removal of the oldest levels when the line limit is reached
## Suggested Settings
For faster and more sensitive market structure:
* Candles Left: 2
* Candles Right: 1
For balanced swing detection:
* Candles Left: 2
* Candles Right: 2
For larger and more significant market structure:
* Candles Left: 3
* Candles Right: 3
Lower values detect more swings but may create more market noise. Higher values produce fewer but generally more significant swing levels.
## Practical Uses
The indicator can help identify:
* Potential support and resistance
* Liquidity above swing highs and below swing lows
* Higher highs and higher lows
* Lower highs and lower lows
* Breaks of market structure
* Trend continuation areas
* Reversal zones
* Multi-timeframe confluence
* Possible entry, stop-loss and take-profit reference levels
## Important Notes
Swing levels are confirmed only after the required right-side candles have formed. This reduces premature signals but creates a natural confirmation delay.
Displaying very low timeframe levels on a much higher timeframe may produce many horizontal lines. For a cleaner chart, enable only the timeframes that are relevant to your trading strategy.
The amount of available lower-timeframe historical data may also depend on TradingView’s intrabar data limits and the user’s subscription plan.
This indicator does not provide automatic buy or sell signals. It is designed as a market structure and technical analysis tool.
Use it together with your own trading plan, risk management and confirmation criteria.
Disclaimer: This indicator is provided for educational and informational purposes only. It does not constitute financial advice.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.