Bounce DurationOverview
Bounce Duration measures and visualizes the bar count of price bounces within a bearish cycle, from a confirmed swing low to its highest swing high before the next lower low. Each completed bounce is drawn as a labeled box, making it immediately obvious when the current bounce is behaving differently from historical ones.
Most bounce-analysis tools focus on price magnitude (how far a rally retraced). This indicator focuses on time , a dimension that is equally important but rarely visualized directly. An unusually long bounce duration is often a meaningful signal that market structure is changing.
How It Works
Swing highs and lows are identified using confirmed pivots. A bounce is measured from a post-ATH swing low to the highest swing high before the next lower low. The cycle resets on a new all-time high, ensuring only post-peak corrective bounces are measured. A live box tracks the current in-progress bounce in real time for direct comparison against history.
Two safeguards prevent false signals:
Bounces that reach a new ATH are excluded automatically
Only swing lows occurring on or after the ATH reset bar are accepted as valid starting points
Inputs
Minimum Bounce Duration (bars) - Filters out bounces shorter than this threshold
Pivot Length (bars L/R) - Controls swing detection sensitivity. Higher values find fewer, more significant pivots
Use Close Instead of Wick - Switches pivot detection to closing prices, useful for filtering wick noise on volatile instruments
Show Current Bounce - Toggles the live unconfirmed bounce box
Colors, text size, and label alignment are fully customizable
How to Use It
Compare the duration of the current bounce to all prior bounces in the same corrective cycle. Bear market bounces are typically short and uniform. When a bounce persists significantly longer than any previous one, it suggests accumulation may be underway rather than a simple relief rally.
Example: On Bitcoin's daily chart, the current bounce from the 2026 lows, measured on closing prices, is already longer in duration than every prior bounce in the post-ATH correction of prior cycles. This temporal outlier supports the case for a durable bottom forming rather than just another bear market bounce.
The indicator works on any timeframe and any instrument with clear corrective cycles. Adjust Pivot Length to match your timeframe, lower values for intraday and higher for weekly or monthly analysis.
Notes
The current bounce box repaints as it updates each bar. Confirmed historical boxes do not repaint.
No boxes are shown during a sustained uptrend. The indicator is designed for post-peak corrective analysis only.
For informational and educational purposes only. Not financial advice.
Indicador Pine Script®






















