Breakout Odds [Rider Algo]Breakout Odds v4 — Empirical Breakout Probability with Directional Bias & Quality Filters
What it does: Quantifies breakout probability (0–100) and breakout directional bias (-100 to +100), then applies quality filters so only high-conviction setups signal.
What Is This Indicator?
When price is stuck in a range, Breakout Odds v4 answers:
"How likely is a breakout right now?" → Score 0 to 100
"Which direction will it go?" → Bias -100 (bearish) to +100 (bullish)
Instead of relying on a single trigger, it combines 9 independent factors — 5 for probability and 4 for direction — into a unified weighted model, then applies 3 quality filters (trend alignment, candle confirmation, cooldown) to block low-quality signals.
When everything aligns, it prints a directional signal : 🟢 BULL triangle or 🔴 BEAR triangle.
This is not a crystal ball. It’s a confirmation framework designed to keep you out of weak breakouts.
---
The Architecture
The indicator runs as a 3-stage pipeline:
Stage 1 → Probability Engine: “Is a breakout likely?” (Score 0–100)
Stage 2 → Direction Engine: “Which way?” (Bias -100 to +100)
Stage 3 → Quality Filters: “Is this signal worth taking?” (Pass / Block)
Signals only fire when all three stages agree.
---
Stage 1: Breakout Probability (Score 0–100)
This engine measures how “ready” the market is to break out of the current range, using five conditions that often precede strong breakouts:
Bollinger Band Width (default weight: 25%)
Measures BB compression vs recent history. Narrow bands = coiled spring → higher score.
ATR Compression (default weight: 20%)
Compares current ATR% vs its lookback range. Confirms volatility squeeze (layer-2 validation).
Relative Volume (default weight: 25%)
Current volume vs average volume. Rising volume during compression suggests accumulation.
Capped at 3× avg to avoid single-spike distortion.
Distance to Range Edges (default weight: 15%)
How close price is to the nearest range boundary (high/low). Closer = more imminent.
Level Tests (default weight: 15%)
Counts touches/approaches to range ceiling/floor. More tests weaken the level → higher break odds.
---
Stage 2: Directional Bias (-100 to +100)
Once probability says “breakout is likely,” the direction engine estimates which way using four factors:
Price Position Within Range (default weight: 30%)
Above midpoint / pressing ceiling = bullish bias. Below midpoint / pressing floor = bearish bias.
Volume Pressure at Levels (default weight: 30%)
Compares total volume near range high vs range low. More volume near highs → buying pressure (bullish).
More near lows → selling pressure (bearish).
Short-Term Momentum Slope (default weight: 20%)
Linear regression slope over N bars. Rising slope = bullish momentum, falling slope = bearish.
Candle Bias Analysis (default weight: 20%) — Optional, ON by default
Body-to-range quality scoring over a lookback (default 10). Clean bodies (small wicks) count more.
Measures the balance + quality of bullish vs bearish candles.
Interpretation:
Bias > 0 = bullish, Bias < 0 = bearish
|Bias| = confidence (shown as Dir Strength in the panel)
---
Stage 3: Quality Filters
This is what makes v4 materially more selective than earlier versions.
Filter 1: Trend Alignment (EMA) — Optional, ON by default
A 200 EMA sets macro trend rules:
BULL signals allowed only when price is above EMA
BEAR signals allowed only when price is below EMA
This eliminates the classic mistake: bull signals in downtrends and bear signals in uptrends .
Disable if your strategy is counter-trend.
Filter 2: Candle Confirmation — Always active
Signals do not fire just because score crosses the threshold.
It waits for the candle to close at or beyond the range edge .
If score is high but price is still mid-range, no signal .
Filter 3: Signal Cooldown — Configurable (default: 10 bars)
After a signal prints, no new signals for X bars.
Prevents clustering when score oscillates around the threshold in chop.
---
How to Read the Indicator
Visual Elements
Score Line (colored): probability line with dynamic zones
🟢 Green (80–100): High breakout probability
🟡 Yellow (60–79): Moderate — watch closely
🟠 Orange (40–59): Low — range likely holds
🔴 Red (0–39): Very low — no breakout expected
Shaded Area (green/red): real-time directional bias
Green = bullish lean, red = bearish lean. Bigger = stronger conviction.
Dashed White Line: signal threshold (default 70)
Background Tint: when score is above threshold and trend filter agrees
Green tint = bullish context, red tint = bearish context.
Signal Triangles:
🟢 BULL (bottom): confirmed bullish breakout (all filters passed)
🔴 BEAR (top): confirmed bearish breakout (all filters passed)
Info Panel (right):
Composite score + direction (with strength), component breakdowns, and filter statuses (Trend / Confirm / Cooldown).
When to Act
Designed for confirmation, not prediction . Typical workflow:
Score climbs into 60–70+ as compression builds
Directional bias shows which side is “winning”
Wait for the confirmed BULL/BEAR triangle (score high + clear direction + filters pass + edge close)
Use your own risk plan for entry/SL/targets
---
Customizing the Weights
You can tune every component from settings — no code edits .
Probability Weights (Score Weights group)
Weight — BB Width (default 25%)
Weight — ATR Compression (default 20%)
Weight — Relative Volume (default 25%)
Weight — Distance to Edges (default 15%)
Weight — Level Tests (default 15%)
Direction Weights (Direction Weights group)
Dir Weight — Price Position (default 30%)
Dir Weight — Volume Pressure (default 30%)
Dir Weight — Momentum Slope (default 20%)
Dir Weight — Candle Bias (default 20%)
Weight Tips
Weights do not need to sum to 100. The script normalizes automatically.
Volume-driven breakouts: increase Relative Volume , reduce BB Width .
Low-volume markets / off-hours: reduce Relative Volume , increase BB Width + ATR Compression .
Stronger directional conviction: increase Momentum Slope + Candle Bias .
Conservative: threshold 80, higher Level Tests, keep filters ON → fewer but cleaner signals.
Aggressive: threshold 60, disable trend filter, cooldown 5 → more signals, more risk.
---
Quality Filter Settings
Enable Trend Filter (EMA): ON (default) — blocks counter-trend signals
Trend EMA Period: 200
Enable Candle Bias Analysis: ON (default)
Candle Bias Lookback: 10 bars
Signal Cooldown: 10 bars
---
Other Configurable Parameters
Analysis Period: 50 bars
Signal Threshold: 70
BB Period / Multiplier: 20 / 2.0
ATR Period: 14
Volume Average Period: 20
S/R Tolerance: 0.5%
Minimum Tests: 2
Momentum Lookback: 10 bars
---
Alerts
Three independent conditions:
Confirmed Bullish Breakout — score ≥ threshold + bullish bias + all filters pass
Confirmed Bearish Breakout — score ≥ threshold + bearish bias + all filters pass
Extreme Score (≥90) — score hits 90+ regardless of direction/filters (rare compression event)
---
What’s New in v4 (vs v3)
Trend Filter (EMA 200): v3 = No → v4 = Yes (optional, default ON)
Candle Close Confirmation: v3 = No → v4 = Yes (always active)
Candle Bias Analysis: v3 = No → v4 = Yes (optional, default ON)
Signal Cooldown: v3 = No → v4 = Yes (default 10)
Direction Factors: v3 = 3 → v4 = 4
Filter Status in Panel: v3 = No → v4 = Yes
Signal Reliability: v3 = Baseline → v4 = improved via filtering
The core probability engine is unchanged; v4 adds quality control on top of v3’s foundation — same detection, better filtering .
---
Important Notes
Does not repaint. Uses confirmed bar data only.
Score is contextual probability , not a guarantee — manage risk.
Works on any timeframe / asset class (stocks, forex, crypto, commodities).
Best used with your own S/R mapping: indicator suggests when a level is likely to break and which way ; your plan decides if the trade is valid.
Filters reduce false signals — they cannot eliminate them.
Developed by Rider Algo
อินดิเคเตอร์ Pine Script®
