OPEN-SOURCE SCRIPT

Breakouts & Pullbacks [Trendoscope®]

660
🎲 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:
  • “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:
  1. Breakout Point – The exact bar where price closes above the previous ATH after at least Minimum Gap bars.
  2. Pullback Phase – From breakout candle high → lowest low before price recovers back above the breakout level.
  3. Recovery Phase – From the pullback low → the bar where price first trades back above the original breakout price.
  4. 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.

免責事項

この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。