80% EDGE Rule - TPO Based

80% EDGE RULE - TPO BASED
═════════════════════════════════════════════════════════════
█ OVERVIEW
The 80% Edge Rule is a high-probability Market Profile concept that identifies when price is likely to traverse the prior session's Value Area. This indicator automates the detection, confirmation, and tracking of 80% EDGE Rule setups using true TPO (Time Price Opportunity) calculations—not volume profile.
When price opens outside the previous day's Value Area and then re-enters and is "accepted" back inside, there is an 80% statistical probability that price will travel to the opposite side of the Value Area. This indicator does all the heavy lifting: calculating the prior session's Value Area, detecting valid setups, confirming acceptance, and tracking progress toward the target.
█ THE 80% EDGE RULE EXPLAINED
The 80% Edge Rule is based on Market Profile theory developed by J. Peter Steidlmayer at the Chicago Board of Trade. The rule states:
❶ If price OPENS OUTSIDE the prior day's Value Area...
❷ And then ENTERS and is ACCEPTED back into the Value Area...
❸ There is an 80% chance price will rotate to the OTHER SIDE of the Value Area.
"Acceptance" is defined as price spending TWO OR MORE TPO periods (typically 30-minute blocks) inside the Value Area. This indicates that the market has accepted these prices as fair value, and the auction process will likely continue through to the opposite boundary.
BULLISH SETUP: Price opens BELOW the prior VAL → Enters and is accepted → Target is VAH
BEARISH SETUP: Price opens ABOVE the prior VAH → Enters and is accepted → Target is VAL
█ HOW THIS INDICATOR WORKS
This indicator performs several automated functions:
1. TPO VALUE AREA CALCULATION
• Analyzes the prior RTH (Regular Trading Hours) session
• Builds a true TPO distribution using 30-minute time blocks
• Each price level receives +1 TPO for each period it was touched
• Calculates POC (Point of Control) as the price with highest TPO count
• Expands from POC using the CME/CBOT standard "two-price" method until 70% of TPOs are captured
• This defines VAH (Value Area High) and VAL (Value Area Low)
2. SETUP DETECTION
• Monitors the RTH open (default 9:30 AM ET)
• Detects if price opened outside the prior Value Area
• Determines setup direction (Bullish or Bearish)
3. ACCEPTANCE MONITORING
• Tracks TPO blocks where price remains inside the Value Area
• Confirms setup when required number of blocks is reached (default: 2)
• Resets count if price exits VA before confirmation
4. TARGET & INVALIDATION TRACKING
• Monitors for target completion (opposite VA boundary)
• Monitors for invalidation (price moves beyond entry VA boundary + buffer)
• Visual feedback on outcome
█ VISUAL ELEMENTS
PRIOR VALUE AREA LINES (Dashed)
• RED DASHED LINE: Prior Day VAH (Value Area High)
• GREEN DASHED LINE: Prior Day VAL (Value Area Low)
• PURPLE DOTTED LINE: Prior Day POC (Point of Control)
TRADE LINES (Solid)
• YELLOW LINE: Entry price (where setup was confirmed)
• CYAN LINE: Target price (opposite VA boundary)
• GREEN LINE: Entry line turns green when target is hit
• GRAY LINES: Both lines turn gray if setup is invalidated
STATUS LABEL
• Floating label showing current setup state
• ORANGE "WATCHING": Setup detected, monitoring for acceptance
• YELLOW "CONFIRMED": Setup confirmed, tracking toward target
• GREEN "TARGET HIT ✓": Target successfully reached
• RED "INVALIDATED ✗": Setup failed, price moved against
DASHBOARD (Top Right Corner)
• Prior VAH: Yesterday's Value Area High
• Prior VAL: Yesterday's Value Area Low
• Prior POC: Yesterday's Point of Control
• Open Price: Today's RTH opening price
• Direction: BULLISH ↑ or BEARISH ↓
• Status: Current setup state
█ CONFIGURABLE SETTINGS
┌────────────────────────────────────────────────────────────
│ TPO SETTINGS
├────────────────────────────────────────────────────────────
│ Tick Size (Default: 0.25) │ • Price increment for TPO calculations
│ • ES/MES: 0.25
│ • NQ/MNQ: 0.25
│ • YM/MYM: 1.0
│ • RTY: 0.1 │ • CL/MCL: 0.01
│ • GC/MGC: 0.1
│
│ Value Area % (Default: 70)
│ • Percentage of TPOs to include in Value Area
│ • Standard is 70% (one standard deviation)
│ • Can adjust 50-90% based on preference
│
│ TPO Block Duration (Default: 30 minutes)
│ • Length of each TPO period
│ • Standard Market Profile uses 30-minute periods
│ • Adjust if using non-standard TPO settings
└────────────────────────────────────────────────────────────
┌────────────────────────────────────────────────────────────
│ 80% EDGE RULE SETTINGS
├────────────────────────────────────────────────────────────
│ TPO Blocks Required for Acceptance (Default: 2)
│ • Number of 30-min periods price must stay inside VA
│ • Standard rule requires 2 periods for acceptance
│ • More conservative: Increase to 3
│ • More aggressive: Reduce to 1 (not recommended)
│
│ Invalidation Distance (Default: 10 points)
│ • Buffer beyond VA boundary before setup is invalidated
│ • Bullish: Invalidates if LOW goes below VAL minus this distance
│ • Bearish: Invalidates if HIGH goes above VAH plus this distance
│ • Adjust based on product volatility and your risk tolerance
│
│ Fade Delay (Default: 5 minutes)
│ • How long entry/target lines stay visible after outcome
│ • Lines and floating label disappear after this delay
│ • Dashboard retains the outcome status until next session
└────────────────────────────────────────────────────────────
┌────────────────────────────────────────────────────────────
│ SESSION SETTINGS
├────────────────────────────────────────────────────────────
│ RTH Session (Default: 0930-1600)
│ • Regular Trading Hours window
│ • This determines which bars are used for TPO calculation
│ • Also determines when RTH "open" is detected
│
│ PRODUCT-SPECIFIC RTH SESSIONS:
│ • Equity Index Futures (ES, NQ, YM, RTY): 0930-1600
│ • Crude Oil (CL): 0900-1430 (pit session)
│ • Gold (GC): 0820-1330 (pit session)
│ • Treasury Bonds/Notes: 0720-1400
│ • Forex Futures: Varies by product
│
│ Timezone (Default: America/New_York)
│ • Timezone for session calculations
│ • Options: New York, Chicago, Los Angeles, UTC
│ • Use exchange timezone for accurate session detection
└────────────────────────────────────────────────────────────
┌────────────────────────────────────────────────────────────
│ VISUAL SETTINGS
├────────────────────────────────────────────────────────────
│ Show Prior VA Lines: Toggle VAH/VAL/POC lines on/off
│ Show Entry/Target Lines: Toggle trade-related lines on/off
│ VAH Color: Color for Value Area High line
│ VAL Color: Color for Value Area Low line
│ POC Color: Color for Point of Control line
│ Entry Line Color: Color for entry price line
│ Target Line Color: Color for target price line
│ Target Hit Color: Color when target is reached (default: green)
│ Line Width: Thickness of all lines (1-5)
└────────────────────────────────────────────────────────────
┌────────────────────────────────────────────────────────────
│ DEBUG SETTINGS
├────────────────────────────────────────────────────────────
│ Show Debug Info: Displays additional diagnostic information
│ • Session High/Low of prior day
│ • Current RTH status
│ • Current TPO block number
│ • Outcome timestamp
│ • Useful for troubleshooting or verifying calculations
└────────────────────────────────────────────────────────────
█ ALERTS
This indicator includes three configurable alerts:
① SETUP CONFIRMED
• Triggers when acceptance criteria is met
• Includes entry price and target price in alert message
② TARGET HIT
• Triggers when price reaches the opposite VA boundary
• Confirms successful completion of the 80% Rule setup
③ INVALIDATED
• Triggers when price moves beyond the invalidation threshold
• Signals that the setup has failed
To enable alerts:
1. Ensure "Enable Alerts" is checked in indicator settings
2. Right-click on the indicator → "Add Alert"
3. Select the condition you want to be alerted on
4. Configure notification method (popup, email, webhook, etc.)
█ RECOMMENDED USAGE
TIMEFRAME:
• Best used on 5-minute, 15-minute, or 30-minute charts
• The chart timeframe should divide evenly into 30 minutes
• Ensure sufficient historical bars are loaded for prior session calculation
BEST PRACTICES:
• Wait for full confirmation (2 TPO blocks inside VA) before considering entry
• Use the target line as your profit objective
• Consider the invalidation level for stop-loss placement
• Monitor the dashboard for real-time setup status
• Combine with other confluence factors (order flow, support/resistance, etc.)
IMPORTANT NOTES:
• This indicator calculates TRUE TPO-based Value Area, not volume profile
• Prior day VA is recalculated at each new session
• The 80% Rule is a statistical tendency, not a guarantee
• Always use proper risk management
█ ADJUSTING FOR DIFFERENT PRODUCTS
This indicator defaults to Equity Index Futures (ES, NQ, etc.) with:
• RTH Session: 0930-1600
• Timezone: America/New_York
• Tick Size: 0.25
FOR OTHER PRODUCTS, ADJUST:
CRUDE OIL (CL/MCL):
• RTH Session: 0900-1430
• Tick Size: 0.01
GOLD (GC/MGC):
• RTH Session: 0820-1330
• Tick Size: 0.10
TREASURY FUTURES (ZB, ZN):
• RTH Session: 0720-1400
• Tick Size: 0.03125 (ZB) or 0.015625 (ZN)
E-MINI DOW (YM/MYM):
• RTH Session: 0930-1600
• Tick Size: 1.0
RUSSELL 2000 (RTY):
• RTH Session: 0930-1600
• Tick Size: 0.10
Always verify the RTH session times and tick sizes for your specific product and exchange.
█ DISCLAIMER
This indicator is provided for educational and informational purposes only. It is not financial advice and should not be construed as a recommendation to buy or sell any financial instrument. Trading futures and other leveraged products involves substantial risk of loss and is not suitable for all investors.
Past performance is not indicative of future results. The 80% Edge Rule is a statistical observation based on Market Profile theory and does not guarantee any specific outcome. Always conduct your own analysis and use proper risk management.
Skrypt tylko na zaproszenie
Dostęp do tego skryptu mają wyłącznie użytkownicy zatwierdzeni przez autora. Aby z niego korzystać, należy poprosić o zgodę i ją uzyskać. Zgoda jest zazwyczaj udzielana po dokonaniu płatności. Więcej informacji można znaleźć w instrukcjach autora poniżej lub kontaktując się bezpośrednio z RyanBaileyEdge.
TradingView NIE zaleca płacenia za skrypt ani korzystania z niego, jeśli nie ma pełnego zaufania do jego autora i nie rozumie się zasad jego działania. Można również znaleźć darmowe, otwartoźródłowe alternatywy w skryptach społeczności.
Instrukcje autora
S&P Edge
Wyłączenie odpowiedzialności
Skrypt tylko na zaproszenie
Dostęp do tego skryptu mają wyłącznie użytkownicy zatwierdzeni przez autora. Aby z niego korzystać, należy poprosić o zgodę i ją uzyskać. Zgoda jest zazwyczaj udzielana po dokonaniu płatności. Więcej informacji można znaleźć w instrukcjach autora poniżej lub kontaktując się bezpośrednio z RyanBaileyEdge.
TradingView NIE zaleca płacenia za skrypt ani korzystania z niego, jeśli nie ma pełnego zaufania do jego autora i nie rozumie się zasad jego działania. Można również znaleźć darmowe, otwartoźródłowe alternatywy w skryptach społeczności.
Instrukcje autora
S&P Edge