OPEN-SOURCE SCRIPT
Bounce Duration

Overview
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:
Inputs
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
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.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
Technical analysis should be made as simple as possible, but no simpler. --Albert Einstein
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
Technical analysis should be made as simple as possible, but no simpler. --Albert Einstein
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。