OPEN-SOURCE SCRIPT
Edo Swing Levels

Edo Swing Levels — Tracks the Swing High and Low, Marks the Strong Level Defending the Trend and Flags the CHoCH When It Breaks



At any moment, market structure comes down to two prices: the last swing high and the last swing low. But they are not equal. One of them is the level that defends the current trend —the one a trader watches to know whether the trend continues or breaks— and the other is only a matter of time before it is taken. Edo Swing Levels keeps both always in view and, crucially, tells them apart.
It marks the level defending the trend as Strong —a solid, marked line— and the other as Weak —a dashed, faded line. In an uptrend the swing low is Strong (the support that holds) and the high is Weak; in a downtrend the swing high is Strong (the cap that holds) and the low is Weak. When price closes through the Strong level, a change of character (CHoCH) occurs: the structure that held the trend up breaks, the bias flips and the roles swap. Everything is validated on closed bars, so it does not repaint. The strong and weak levels, their roles and the change of character are all resolved on the chart's own series, with nothing else required.
STRONG AND WEAK LEVELS
The indicator keeps the last confirmed swing high and swing low, and classifies them by the bias. In a bullish bias, the low is the Strong level and the high is Weak. In a bearish bias, the high is Strong and the low is Weak. The Strong level is drawn solid, thicker and at full opacity; the Weak level is dashed, thinner and faded. Each line carries a label —Strong High, Weak High, Strong Low or Weak Low— and both are projected to the right by a configurable number of bars so they sit ahead of price as live references. The high level is red and the low level teal by default, with a neutral gray until a trend is defined.
SWING PROFILES
The sensitivity of the levels is set by the Swing Profile: Scalper (5 bars each side) for fast intraday levels on low timeframes, Swing (10 bars, the default) for the balanced 4H and daily read, and Long Term (21 bars) for the major levels on weekly and higher horizons. The larger the length, the more significant a turn has to be, and the more important and spaced out the marked levels are.
BIAS AND CHoCH
The bias is inferred from the breaks of structure and is what decides which level is Strong and which Weak. A close above the last swing high turns the bias bullish; a close below the last swing low turns it bearish. The decisive event is the change of character: when price closes through the Strong level —below the Strong Low in an uptrend, or above the Strong High in a downtrend— the trend that the level defended breaks, the bias flips and the strong level becomes weak. Taking out the Weak level, by contrast, is a simple continuation that confirms the trend without changing it. The solid/dashed distinction separates, at a glance, the decisive level from the one that is a mere target.
INFORMATION PANEL
A compact panel under the indicator header shows the market bias (Bullish / Bearish / Neutral) and, for the high and the low, their exact price and whether each is the Strong or Weak level, in the same red/teal color code. The bias row gives the direction; the High and Low rows give the prices and, above all, which of the two is the Strong level to watch. The panel sits in any of the four chart corners (Top Right by default), comes in three sizes (Tiny / Small / Normal) and two themes (Dark / Light), and can be hidden entirely. To keep the calculation light, it is drawn only on the last bar.
NO REPAINTING
Levels are built on confirmed pivots and breaks are validated on closed bars, so a level never appears or disappears intrabar and a wick that pierces a level but closes back on the same side does not count as a break. There are no higher-timeframe functions: all logic runs on the current chart timeframe. For a multi-timeframe read, apply it on several charts at once.
CONFIGURATION
The inputs are grouped by block. Structure sets the swing profile and how many bars the levels are projected to the right. Style exposes the high-level and low-level colors, the neutral color, the label size and the Dark/Light theme. Panel controls panel visibility, position and size. The defaults are calibrated to work without adjustment on stocks, crypto, forex, indices and futures, on any timeframe — the input most users touch is the Swing Profile, to set the sensitivity of the levels to their trading horizon.
ALERTS
Four predefined alerts cover the structure read. Strong High taken and Strong Low taken fire on the change of character —when price closes through the Strong level and the trend turns— and are the context alerts. New swing high and New swing low fire when a new level is fixed. All alerts fire on bar close, consistent with the indicator's anti-repaint validation.
HOW TO READ IT
Take the Strong level as your invalidation line: while price respects it, trading with the bias has the wind at its back, and its close-through is the signal that the trend has broken. Take the Weak level as your target: in an uptrend price tends to go for the weak high, in a downtrend for the weak low, and the distance between the two levels gives the room available inside the current structure. And treat the taking of the Strong level as the cleanest turn warning —it often marks the start of a new leg in the opposite direction. Pairing it with the HH/HL/LH/LL sequence classification reinforces the read.
OPEN SOURCE
Edo Swing Levels is published as a free open source indicator. The full Pine Script is publicly accessible on TradingView for study, adaptation and integration into any workflow. Part of the Edolab Markets free tools ecosystem, all available on TradingView.
This indicator is a technical analysis tool for educational and informational purposes only. It does not generate automatic buy or sell signals and should not be considered financial advice. Trading financial markets involves significant risk of capital loss. Past performance does not guarantee future results. Always use proper risk management.
At any moment, market structure comes down to two prices: the last swing high and the last swing low. But they are not equal. One of them is the level that defends the current trend —the one a trader watches to know whether the trend continues or breaks— and the other is only a matter of time before it is taken. Edo Swing Levels keeps both always in view and, crucially, tells them apart.
It marks the level defending the trend as Strong —a solid, marked line— and the other as Weak —a dashed, faded line. In an uptrend the swing low is Strong (the support that holds) and the high is Weak; in a downtrend the swing high is Strong (the cap that holds) and the low is Weak. When price closes through the Strong level, a change of character (CHoCH) occurs: the structure that held the trend up breaks, the bias flips and the roles swap. Everything is validated on closed bars, so it does not repaint. The strong and weak levels, their roles and the change of character are all resolved on the chart's own series, with nothing else required.
STRONG AND WEAK LEVELS
The indicator keeps the last confirmed swing high and swing low, and classifies them by the bias. In a bullish bias, the low is the Strong level and the high is Weak. In a bearish bias, the high is Strong and the low is Weak. The Strong level is drawn solid, thicker and at full opacity; the Weak level is dashed, thinner and faded. Each line carries a label —Strong High, Weak High, Strong Low or Weak Low— and both are projected to the right by a configurable number of bars so they sit ahead of price as live references. The high level is red and the low level teal by default, with a neutral gray until a trend is defined.
SWING PROFILES
The sensitivity of the levels is set by the Swing Profile: Scalper (5 bars each side) for fast intraday levels on low timeframes, Swing (10 bars, the default) for the balanced 4H and daily read, and Long Term (21 bars) for the major levels on weekly and higher horizons. The larger the length, the more significant a turn has to be, and the more important and spaced out the marked levels are.
BIAS AND CHoCH
The bias is inferred from the breaks of structure and is what decides which level is Strong and which Weak. A close above the last swing high turns the bias bullish; a close below the last swing low turns it bearish. The decisive event is the change of character: when price closes through the Strong level —below the Strong Low in an uptrend, or above the Strong High in a downtrend— the trend that the level defended breaks, the bias flips and the strong level becomes weak. Taking out the Weak level, by contrast, is a simple continuation that confirms the trend without changing it. The solid/dashed distinction separates, at a glance, the decisive level from the one that is a mere target.
INFORMATION PANEL
A compact panel under the indicator header shows the market bias (Bullish / Bearish / Neutral) and, for the high and the low, their exact price and whether each is the Strong or Weak level, in the same red/teal color code. The bias row gives the direction; the High and Low rows give the prices and, above all, which of the two is the Strong level to watch. The panel sits in any of the four chart corners (Top Right by default), comes in three sizes (Tiny / Small / Normal) and two themes (Dark / Light), and can be hidden entirely. To keep the calculation light, it is drawn only on the last bar.
NO REPAINTING
Levels are built on confirmed pivots and breaks are validated on closed bars, so a level never appears or disappears intrabar and a wick that pierces a level but closes back on the same side does not count as a break. There are no higher-timeframe functions: all logic runs on the current chart timeframe. For a multi-timeframe read, apply it on several charts at once.
CONFIGURATION
The inputs are grouped by block. Structure sets the swing profile and how many bars the levels are projected to the right. Style exposes the high-level and low-level colors, the neutral color, the label size and the Dark/Light theme. Panel controls panel visibility, position and size. The defaults are calibrated to work without adjustment on stocks, crypto, forex, indices and futures, on any timeframe — the input most users touch is the Swing Profile, to set the sensitivity of the levels to their trading horizon.
ALERTS
Four predefined alerts cover the structure read. Strong High taken and Strong Low taken fire on the change of character —when price closes through the Strong level and the trend turns— and are the context alerts. New swing high and New swing low fire when a new level is fixed. All alerts fire on bar close, consistent with the indicator's anti-repaint validation.
HOW TO READ IT
Take the Strong level as your invalidation line: while price respects it, trading with the bias has the wind at its back, and its close-through is the signal that the trend has broken. Take the Weak level as your target: in an uptrend price tends to go for the weak high, in a downtrend for the weak low, and the distance between the two levels gives the room available inside the current structure. And treat the taking of the Strong level as the cleanest turn warning —it often marks the start of a new leg in the opposite direction. Pairing it with the HH/HL/LH/LL sequence classification reinforces the read.
OPEN SOURCE
Edo Swing Levels is published as a free open source indicator. The full Pine Script is publicly accessible on TradingView for study, adaptation and integration into any workflow. Part of the Edolab Markets free tools ecosystem, all available on TradingView.
This indicator is a technical analysis tool for educational and informational purposes only. It does not generate automatic buy or sell signals and should not be considered financial advice. Trading financial markets involves significant risk of capital loss. Past performance does not guarantee future results. Always use proper risk management.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
EdoLab Markets – Precision Trading Tools
Get Exclusive Indicators:
edolab.io
All content provided is for informational and educational purposes only. Past performance does not guarantee future results.
Get Exclusive Indicators:
edolab.io
All content provided is for informational and educational purposes only. Past performance does not guarantee future results.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
EdoLab Markets – Precision Trading Tools
Get Exclusive Indicators:
edolab.io
All content provided is for informational and educational purposes only. Past performance does not guarantee future results.
Get Exclusive Indicators:
edolab.io
All content provided is for informational and educational purposes only. Past performance does not guarantee future results.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.