OPEN-SOURCE SCRIPT

Breakout and Retest Signals - FloAlgo

2 707
This indicator detects breakout and retest signals by identifying key pivot zones and validating price rejection through wick sweeps and volume analysis.

How It Works

The script operates in three stages:
  • Pivot Zone Detection — Identifies swing highs and lows, then constructs zones anchored to the candle body and wick that formed the pivot. Demand zones span from body top down to wick low; supply zones span from wick high down to body bottom.
  • Rejection Validation — Confirms a valid signal when price sweeps beyond the zone extreme (wick tip) and closes back through the zone body, indicating institutional liquidity capture.
  • Volume Confirmation — Uses lower timeframe volume delta and buy/sell ratio to validate signal strength, filtering weak rejections with insufficient conviction.


Key Advantages
  • No Repaint — Single-period pivot detection ensures signals fire on confirmed historical bars, eliminating repaint delay between alert and visual.
  • Fixed Width Zones — Zones do not grow indefinitely; they are drawn with fixed horizontal width and trimmed only on signal, keeping charts clean.
  • Range-Based Overlap Guard — Demand and supply zones cannot overlap; range-based checking prevents conflicting zones from occupying the same price area.
  • Professional Visuals — No text labels or arrow clutter; only shaded zones and volume ratio splits for clean, professional appearance.
  • Accurate Zone Geometry — Zones anchored to actual candle body and wick formations, not flat ATR bands.
  • Auto-Cleanup — Zones are automatically removed one bar after signal or on expiry, preventing chart clutter.
  • Seconds Chart Support — Volume timeframe input guarded to prevent errors on sub-minute charts.
  • No Signal Conflicts — Removed confirmation divisor that caused opposing signals on the same bar.


Zone Lifecycle
  • Unlike traditional indicators that grow zones indefinitely, this script uses a fixed-width approach:
  • Zones are drawn from the pivot candle to a fixed future bar (born + maxLife)
  • Upon signal, the zone right edge is trimmed to the signal bar
  • The zone remains visible for one bar after the signal, then is automatically removed
  • Expired zones without signals are cleanly purged to prevent chart clutter


Visual Elements
  • Shaded boxes marking demand (green) and supply (red) pivot zones
  • Volume ratio split boxes within zones showing buy/sell pressure balance
  • Dashed target projection lines from signal bars
  • Zone borders fade and thin out after signal confirmation


Key Settings
  • Swing Length — Sensitivity of pivot high/low detection
  • Max Bars Active — Fixed horizontal width of zones in bars
  • Min Bars Between — Minimum bars between consecutive signals
  • Max Zones Per Side — Maximum active zones per direction
  • Volume TF — Frame for volume delta analysis
  • Show Ratio Split — Display buy/sell volume ratio inside zones
  • Show TP Line — Display target projection lines

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.