OPEN-SOURCE SCRIPT
Breakouts & Pullbacks [Trendoscope®]

🎲 Breakouts & Pullbacks [Trendoscope®] - All-Time High Breakout Analyzer
Probability-Based Post-Breakout Behavior Statistics | Real-Time Pullback & Runup Tracker
A professional-grade Pine Script v6 indicator designed specifically for analyzing the historical and real-time behavior of price after strong All-Time High (ATH) breakouts. It automatically detects significant ATH breakouts (with configurable minimum gap), measures the depth and duration of pullbacks, the speed of recovery, and the subsequent run-up strength — then turns all this data into easy-to-read statistical probabilities and percentile ranks.
Perfect for swing traders, breakout traders, and anyone who wants objective, data-driven insight into questions like:
🎲 Core Concept & Methodology
Indicator is more suitable for indices or index ETFs that generally trade in all-time highs however subjected to regular pullbacks, recovery and runups.
For every qualified ATH breakout, the script identifies 4 distinct phases:

Each completed cycle is stored permanently and used to build a growing statistical database unique to the loaded chart and timeframe.
🎲 Visual Elements

Powerful Statistics Table – The Heart of the Indicator
The table constantly compares the current situation against all past qualified breakouts and shows details about pullbacks, and runups that help us calculate the probability of next pullback, recovery or runup.

🎲 Settings & Inputs
Minimum Gap
The minimum number of bars that must pass between breaking a new ATH and the previous one.
Higher values = stricter filter → only the strongest, cleanest breakouts are counted.
Lower values = more data points (useful on lower timeframes or very trending instruments).
Recommendation:
Daily charts: 30–50
4H charts: 40–80
1H charts: 100–200
🎲 How to Use It in Practice
This indicator helps investors to understand when to be bullish, bearish or cautious and anticipate regular pullbacks, recovery of markets using quantitative methods.
The indicator does not generate buy/sell signals. However, helps traders set expectations and anticipate market movements based on past behavior.
Probability-Based Post-Breakout Behavior Statistics | Real-Time Pullback & Runup Tracker
A professional-grade Pine Script v6 indicator designed specifically for analyzing the historical and real-time behavior of price after strong All-Time High (ATH) breakouts. It automatically detects significant ATH breakouts (with configurable minimum gap), measures the depth and duration of pullbacks, the speed of recovery, and the subsequent run-up strength — then turns all this data into easy-to-read statistical probabilities and percentile ranks.
Perfect for swing traders, breakout traders, and anyone who wants objective, data-driven insight into questions like:
- “How deep do pullbacks usually get after a strong ATH breakout?”
- “How many bars does it typically take to recover the breakout level?”
- “What is the median run-up after recovery?”
- “Where is the current pullback or run-up relative to historical ones?”
🎲 Core Concept & Methodology
Indicator is more suitable for indices or index ETFs that generally trade in all-time highs however subjected to regular pullbacks, recovery and runups.
For every qualified ATH breakout, the script identifies 4 distinct phases:
- Breakout Point – The exact bar where price closes above the previous ATH after at least Minimum Gap bars.
- Pullback Phase – From breakout candle high → lowest low before price recovers back above the breakout level.
- Recovery Phase – From the pullback low → the bar where price first trades back above the original breakout price.
- Post-Recovery Run-up Phase – From the recovery point → current price (or highest high achieved so far).
Each completed cycle is stored permanently and used to build a growing statistical database unique to the loaded chart and timeframe.
🎲 Visual Elements
- Yellow polyline triangle connecting Previous ATH / Pullback point(start), New ATH Breakout point (end), Recovery point (lowest pullback price), and extends to recent ATH price.
- Small green label at the pullback low showing detailed tooltip on hover with all measured values
- Clean, color-coded statistics table in the top-right corner (visible only on the last bar)
Powerful Statistics Table – The Heart of the Indicator
The table constantly compares the current situation against all past qualified breakouts and shows details about pullbacks, and runups that help us calculate the probability of next pullback, recovery or runup.
🎲 Settings & Inputs
Minimum Gap
The minimum number of bars that must pass between breaking a new ATH and the previous one.
Higher values = stricter filter → only the strongest, cleanest breakouts are counted.
Lower values = more data points (useful on lower timeframes or very trending instruments).
Recommendation:
Daily charts: 30–50
4H charts: 40–80
1H charts: 100–200
🎲 How to Use It in Practice
This indicator helps investors to understand when to be bullish, bearish or cautious and anticipate regular pullbacks, recovery of markets using quantitative methods.
The indicator does not generate buy/sell signals. However, helps traders set expectations and anticipate market movements based on past behavior.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
Trial - trendoscope.io/trial
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
Subscribe - trendoscope.io/pricing
Blog - docs.trendoscope.io
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.