OPEN-SOURCE SCRIPT
Volume Exhaustion Trend Line

Volume Exhaustion Trend Line
OVERVIEW
This indicator plots a trend line that switches position relative to price based on a specific shift in volume behavior at swing highs and swing lows: when a series of pivots that were previously confirmed by volume above its moving average suddenly gets followed by one or more pivots with volume below its moving average, in the direction of the prevailing trend. This break in the volume pattern is treated as an early warning that the current trend may be losing the participation that was driving it.
HOW IT WORKS
1. Swing highs and swing lows are detected using a fractal pivot: a configurable number of bars on the left validates the structural significance of the pivot, and a configurable number of bars on the right confirms it. Fewer right-side bars means faster (but slightly less certain) confirmation.
2. Trend direction is determined purely from price structure, not from a moving average: the trend is bullish when both the most recent swing high and swing low are higher than the previous ones (higher highs / higher lows), and bearish when both are lower (lower highs / lower lows).
3. Each confirmed pivot is classified as "strong" or "weak" by comparing the volume on that exact pivot bar against a simple moving average of volume.
4. The indicator watches for the transition point: while the trend is bullish, if a swing high forms with weak volume right after a swing high that had strong volume, an exhaustion warning state is triggered. It stays active for as long as new swing highs keep forming with weak volume. If a strong-volume high reappears, or the trend structure changes, the warning resets. The same logic applies in mirror for swing lows inside a bearish trend.
5. A line is plotted around price using a moving average offset by a multiple of ATR. In a bullish trend with no active warning, the line sits below price (green). As soon as the warning triggers, the line jumps above price (red) for as long as the warning stays active. The mirror applies in a bearish trend: line above price (red) normally, dropping below price (green) when a weak-volume low breaks a prior strong-volume pattern. The area between the line and price is filled with the corresponding color for visual clarity.
INPUTS
- Left Bars (structural strength): bars to the left required to validate the pivot's significance.
- Right Bars (confirmation delay): bars to the right required to confirm the pivot. Lower values react faster; higher values produce more reliable pivots.
- Volume MA Length: moving average length used as the volume reference for classifying a pivot as strong or weak.
- Line MA Length: moving average length used as the basis for the plotted line.
- ATR Length / ATR Multiplier: control how far the line sits from the moving average basis, in both its normal and warning position.
- Bullish / Bearish Colors: colors for the line and fill in each state.
HOW TO USE IT
Line below price, green: the market is in a structurally confirmed uptrend and recent highs are still backed by above-average volume.
Line jumps above price, red, while price is still trending up: recent high(s) were not backed by above-average volume after previously being backed by it. Treat this as a signal to pay closer attention to that area for a possible loss of upside momentum, not as an automatic sell trigger.
Mirror logic applies in a downtrend: line above price (red) normally, dropping below price (green) when recent lows stop being confirmed by above-average volume after previously being confirmed by it, suggesting selling pressure may be fading.
This indicator identifies a condition, it does not generate entries or exits on its own. It is meant to be combined with your own structure, level, and risk analysis.
LIMITATIONS
- Pivots require Right Bars to pass before they can be confirmed, so every line change is applied with a delay equal to that setting relative to when the actual high/low occurred. Once plotted, it does not repaint or move retroactively.
- Volume shown on non-centralized markets (forex, CFDs, spot metals) is broker/feed-reported tick volume, not centralized traded volume. Interpret weak/strong volume readings on these instruments with that in mind.
- Like any structure-based tool, results vary by instrument, timeframe, and the settings used.
OVERVIEW
This indicator plots a trend line that switches position relative to price based on a specific shift in volume behavior at swing highs and swing lows: when a series of pivots that were previously confirmed by volume above its moving average suddenly gets followed by one or more pivots with volume below its moving average, in the direction of the prevailing trend. This break in the volume pattern is treated as an early warning that the current trend may be losing the participation that was driving it.
HOW IT WORKS
1. Swing highs and swing lows are detected using a fractal pivot: a configurable number of bars on the left validates the structural significance of the pivot, and a configurable number of bars on the right confirms it. Fewer right-side bars means faster (but slightly less certain) confirmation.
2. Trend direction is determined purely from price structure, not from a moving average: the trend is bullish when both the most recent swing high and swing low are higher than the previous ones (higher highs / higher lows), and bearish when both are lower (lower highs / lower lows).
3. Each confirmed pivot is classified as "strong" or "weak" by comparing the volume on that exact pivot bar against a simple moving average of volume.
4. The indicator watches for the transition point: while the trend is bullish, if a swing high forms with weak volume right after a swing high that had strong volume, an exhaustion warning state is triggered. It stays active for as long as new swing highs keep forming with weak volume. If a strong-volume high reappears, or the trend structure changes, the warning resets. The same logic applies in mirror for swing lows inside a bearish trend.
5. A line is plotted around price using a moving average offset by a multiple of ATR. In a bullish trend with no active warning, the line sits below price (green). As soon as the warning triggers, the line jumps above price (red) for as long as the warning stays active. The mirror applies in a bearish trend: line above price (red) normally, dropping below price (green) when a weak-volume low breaks a prior strong-volume pattern. The area between the line and price is filled with the corresponding color for visual clarity.
INPUTS
- Left Bars (structural strength): bars to the left required to validate the pivot's significance.
- Right Bars (confirmation delay): bars to the right required to confirm the pivot. Lower values react faster; higher values produce more reliable pivots.
- Volume MA Length: moving average length used as the volume reference for classifying a pivot as strong or weak.
- Line MA Length: moving average length used as the basis for the plotted line.
- ATR Length / ATR Multiplier: control how far the line sits from the moving average basis, in both its normal and warning position.
- Bullish / Bearish Colors: colors for the line and fill in each state.
HOW TO USE IT
Line below price, green: the market is in a structurally confirmed uptrend and recent highs are still backed by above-average volume.
Line jumps above price, red, while price is still trending up: recent high(s) were not backed by above-average volume after previously being backed by it. Treat this as a signal to pay closer attention to that area for a possible loss of upside momentum, not as an automatic sell trigger.
Mirror logic applies in a downtrend: line above price (red) normally, dropping below price (green) when recent lows stop being confirmed by above-average volume after previously being confirmed by it, suggesting selling pressure may be fading.
This indicator identifies a condition, it does not generate entries or exits on its own. It is meant to be combined with your own structure, level, and risk analysis.
LIMITATIONS
- Pivots require Right Bars to pass before they can be confirmed, so every line change is applied with a delay equal to that setting relative to when the actual high/low occurred. Once plotted, it does not repaint or move retroactively.
- Volume shown on non-centralized markets (forex, CFDs, spot metals) is broker/feed-reported tick volume, not centralized traded volume. Interpret weak/strong volume readings on these instruments with that in mind.
- Like any structure-based tool, results vary by instrument, timeframe, and the settings used.
Open-source script
In true PulseWire spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by PulseWire. Read more in the Terms of Use.
Open-source script
In true PulseWire spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by PulseWire. Read more in the Terms of Use.
