PROTECTED SOURCE SCRIPT
Updated

Prob Stats PPIBW

39
Prob Stats PPIBW - Data-Driven Trading Decisions

Transform historical price patterns into actionable probabilities. This indicator analyzes thousands of periods to show you the real odds behind pivot hits, range
expansions, inside bars, and weekend breakouts.

What It Tracks

Pivot Hit Rates (D/W/M/Q/6M/Y)
What percentage of pivot points get touched during their period? Includes recent period comparison to spot regime changes.
Example: "Daily: 82.3% (450/547) | L30: 76.7% (23/30)"

Previous Period Levels (D/W/M)
How often does current period break previous period's high or low? Only counts actual range expansion, not equilibrium crossings. Helps gauge breakout probability.

Inside Bar Analysis (D/W/M)
When price consolidates inside previous period's range, what are the odds of a breakout? Only appears when currently in an inside bar.

Weekend Breakdown
When Sat/Sun breaks Mon-Fri range, does the following week continue? Critical for crypto traders and weekend gap analysis.

Key Features

- Recent Period Comparison: See if recent behavior differs from historical averages
- Self-Documenting: Hover over any header for instant explanations
- Color-Coded Sections: Yellow (Pivots), Orange (Prev Period), Pink (Inside Bar), Green (Weekend)
- Blue Background: Recent stats highlighted for easy identification
- Dynamic Layout: Adapts based on market conditions
- Real-Time Updates: Includes current period for live probability tracking

How To Use

1. Add to any chart (best on Daily+ for maximum historical data)
2. Hover over column headers to understand each statistic
3. Compare historical vs recent probabilities
4. Use probabilities to inform position sizing and expectations

Example: Weekly pivot shows 78% historical hit rate but only 60% in last 30 weeks. Recent regime change suggests lower probability of test.

Technical Details

- Pine Script v6
- Rolling window arrays track last 30/30/12 periods for D/W/M
- Previous Period excludes EQ crossings for accurate stats
- Works on all timeframes, optimized for Daily+
- Configurable table position

Perfect For

Traders seeking data-driven confirmation, those wanting to quantify probability vs guessing, regime change detection, and crypto traders analyzing weekend patterns.

Note: Past performance doesn't guarantee future results. Use these statistics as one input in your overall trading strategy.
Release Notes
- Make Inside Bars statistics show without condition
- Add weekend statistics

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.