
The Value Area Mean Reversion Strategy Based on 80% Rule is a quantitative trading system specifically designed to validate the classic 80% rule setup. The core concept of this strategy is to capture reversal opportunities when price reenters the previous day’s value area. Operating within a precisely defined ETH futures trading session, the system triggers trading signals when price reenters the previous day’s value area and remains there for a sufficient duration. The primary target is the Point of Control (POC), while also tracking complete value area traversals for research analysis.
This strategy is built on the principle of mean reversion in markets, with particular focus on the relationship between price and value areas. The core logic includes:
Trading Session Definition: The strategy is anchored to a true 22-hour ETH futures window (5PM–3PM Pacific Time), with support for global time zones. This ensures the strategy operates in the correct market environment.
Value Area Calculation: The system automatically calculates Value Area High (VAH), Value Area Low (VAL), and Point of Control (POC):
Signal Confirmation Mechanism: Price must reenter the value area and remain inside for at least 45 minutes (3 bars on a 15-minute chart) to confirm an entry signal. This requirement ensures the authenticity of price reversal intention.
Valid Day Filtering:
Trigger Conditions:
Exit Strategy: The primary target is to exit when price reaches the POC, which aligns with the core idea of mean reversion.
Statistical Foundation: The strategy is based on value areas and the 80% rule, both of which have solid statistical foundations. The value area represents the region where 68% of price activity occurs, similar to one standard deviation in a normal distribution.
Precise Trading Window Definition: The strategy uses a true 22-hour ETH futures window rather than a simple intraday range, more accurately reflecting market structure.
Flexible Time Zone Support: Global traders can adjust the strategy according to their geographical location, enabling the system to function properly in any time zone.
Strict Signal Confirmation: Requiring price to remain in the value area for at least 3 bars before confirming a signal greatly reduces the possibility of false signals.
Precise Target Setting: Using POC as the primary target provides a clear profit point, aligning with the common mean reversion characteristics of futures markets.
Dual Verification Mechanism: Not only requiring price reentry into the value area but also retesting the boundary (VAL or VAH), increasing signal reliability.
Manual Override Mode: When automatic logic is insufficient to handle special market conditions, the strategy allows traders to use manually set value area levels.
Debugging Functionality: Provides detailed diagnostic labels, aiding in strategy development and forward testing.
Mean Reversion Failure Risk: Although the 80% rule is effective in many situations, markets can also exhibit strong trends that prevent prices from reverting to the POC. To mitigate this risk, consider adding trend filters or setting stop-loss points.
Parameter Sensitivity: The 3-bar (45-minute) confirmation requirement is a critical parameter. Too short may lead to premature entry, while too long may miss opportunities. It’s advisable to test different confirmation time settings under various market conditions.
Market Environment Dependence: This strategy performs best in range-bound markets but may underperform in strong trend or high volatility environments. Consider adding market environment filters.
Session Selection Risk: Strategy performance may be affected by the chosen trading session (New York, London, Tokyo, or all-day). It’s recommended to analyze historical performance across different trading sessions to select the optimal one.
Value Area Calculation Method Limitations: Using a fixed 68% range and simplified POC calculation may not accurately reflect the true value distribution in certain markets. Consider using volume-based value area calculation methods for greater accuracy.
Lack of Stop-Loss Mechanism: The current strategy lacks a clear stop-loss mechanism, potentially leading to severe losses in extreme market movements. Implementation of ATR-based or fixed percentage stop-loss settings is recommended.
Dynamic Confirmation Conditions: The current strategy uses a fixed 3-bar confirmation condition. Consider adjusting this parameter based on market volatility. Higher volatility periods may require longer confirmation times, while lower volatility periods may be shortened.
Volume-Based Value Area: The current value area calculation is a simplified price-based method. It can be upgraded to volume-based TPO (Time Price Opportunity) analysis or Volume Profile, which will more accurately reflect the consensus value area of market participants.
Multi-Timeframe Confirmation: Combining with trend direction from larger timeframes can filter out counter-trend signals, only trading with-trend 80% rule signals, potentially increasing strategy success rates.
Adaptive Target Setting: The current strategy uses POC as a fixed target. Consider setting dynamic targets based on market volatility, such as setting further targets (like VAH or VAL) in high volatility markets.
Volatility Filter: Add ATR or other volatility indicators as filtering conditions to avoid trading in extremely low or high volatility market environments.
Session Setting Optimization: Deeply analyze strategy performance across different time zones and trading sessions to find the optimal trading session combination.
Intelligent Stop-Loss Mechanism: Implement intelligent stop-loss logic, such as support/resistance-based stops or volatility-based trailing stops, to better manage risk.
Signal Strength Scoring: Develop a signal quality scoring system that combines the strength of price reentry, characteristics of confirmation bars, and other market factors to assign a strength score to each signal, used to determine position size.
The Value Area Mean Reversion Strategy Based on 80% Rule is a carefully designed quantitative trading system aimed at capturing reversal opportunities when price reenters the value area. Through strict signal confirmation mechanisms, precise session definitions, and clear target settings, it provides traders with a systematic approach to applying the classic 80% trading rule.
The main advantages of the strategy lie in its statistical foundation, strict signal confirmation requirements, and flexible configuration options. However, there are also risks such as mean reversion failure, parameter sensitivity, and market environment dependence. By implementing dynamic confirmation conditions, volume-based value area calculations, multi-timeframe confirmation, and adaptive target settings, the robustness and adaptability of the strategy can be significantly enhanced.
For traders seeking to apply mean reversion strategies in futures markets, this 80% rule-based system provides a solid starting point that can be further customized and optimized according to individual risk preferences and market views.
/*backtest
start: 2025-07-09 00:00:00
end: 2025-07-16 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_OKX","currency":"SOL_USDT","balance":200000}]
*/
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © dscottmuller
// === Update July 15, 2025 ===
// • Converted to strategy for backtesting
// • POC-based exits for precision targeting
// • Full move markers for research tracking
// • Global time zone input (default: America/Los_Angeles)
//@version=5
strategy("80% Rule Backtest", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// === General Inputs ===
useAllMarkets = input.bool(false, "Use 24-Hour Session (All Markets)")
sessionChoice = input.string("New York", "Market Session", options=["New York", "London", "Tokyo"])
showSessionBox = input.bool(false, "Highlight Selected Session")
enableSounds = input.bool(false, "Enable Audible Alerts")
extendLines = input.bool(true, "Extend Lines Right")
// === Advanced Session Settings ===
group = "Advanced Session Settings"
showAutoLevels = input.bool(true, "Show Auto-Calculated VAH/POC/VAL", group=group)
useManualLevels = input.bool(false, "Use Manual VAH/POC/VAL", group=group)
manualVAH = input.float(0.0, "Manual VAH", group=group)
manualVAL = input.float(0.0, "Manual VAL", group=group)
manualPOC = input.float(0.0, "Manual POC", group=group)
debugMode = input.bool(false, "Enable Debug Mode", group=group)
// === Time Zone Selection ===
sessionTZ = input.string("America/Los_Angeles", "ETH Session Timezone",
options=[
"America/Los_Angeles", // Default: Pacific Time
"America/New_York",
"America/Chicago",
"America/Denver",
"Europe/London",
"Europe/Paris",
"Asia/Tokyo",
"Australia/Sydney"
], group=group)
// === Market Session Filter ===
nySession = time(timeframe.period, "0930-1600", "America/New_York")
londonSession = time(timeframe.period, "0800-1630", "Europe/London")
tokyoSession = time(timeframe.period, "0900-1500", "Asia/Tokyo")
allSession = time(timeframe.period, "0000-0000")
inSession = useAllMarkets ? not na(allSession) : sessionChoice == "New York" ? not na(nySession) : sessionChoice == "London" ? not na(londonSession) : sessionChoice == "Tokyo" ? not na(tokyoSession) : false
bgcolor(showSessionBox and inSession ? color.new(color.blue, 90) : na)
// === ETH Session Window (22-Hour Futures) ===
ethStart = timestamp(sessionTZ, year, month, dayofmonth - 1, 17, 00)
ethEnd = timestamp(sessionTZ, year, month, dayofmonth, 15, 00)
inEthWindow = time("30") >= ethStart and time("30") <= ethEnd
ethHigh = inEthWindow ? high : na
ethLow = inEthWindow ? low : na
ethClose = inEthWindow ? close : na
extHigh = ta.highest(ethHigh, 100)
extLow = ta.lowest(ethLow, 100)
extClose = ta.valuewhen(not na(ethClose), ethClose, 0)
// === Value Area Calculations ===
vaRange = (extHigh - extLow) * 0.68
vah = extHigh - ((extHigh - extLow - vaRange) / 2)
val = extLow + ((extHigh - extLow - vaRange) / 2)
poc = (extHigh + extLow + extClose) / 3
finalVAH = useManualLevels ? manualVAH : vah
finalVAL = useManualLevels ? manualVAL : val
finalPOC = useManualLevels ? manualPOC : poc
// === Signal Logic ===
validLongDay = extClose < finalVAL
validShortDay = extClose > finalVAH
insideVA = close > finalVAL and close < finalVAH
reenteredFromBelow = validLongDay and close > finalVAL
reenteredFromAbove = validShortDay and close < finalVAH
var int barsInside = 0
barsInside := ta.change(time("D")) ? 0 : insideVA ? barsInside + 1 : 0
insideConfirmed = barsInside >= 3
retestVAL = validLongDay and low <= finalVAL
retestVAH = validShortDay and high >= finalVAH
longSignal = inSession and validLongDay and reenteredFromBelow and insideConfirmed and retestVAL
shortSignal = inSession and validShortDay and reenteredFromAbove and insideConfirmed and retestVAH
longBar = longSignal and not longSignal[1]
shortBar = shortSignal and not shortSignal[1]
// === Strategy Entries ===
if longBar
strategy.entry("Long", strategy.long, comment="80% Long Signal")
if shortBar
strategy.entry("Short", strategy.short, comment="80% Short Signal")
// === Strategy Exits at POC ===
strategy.exit("Long to POC", from_entry="Long", limit=finalPOC)
strategy.exit("Short to POC", from_entry="Short", limit=finalPOC)
// === Track Full Move (Visual Only) ===
longFullHit = longBar and high >= finalVAH
shortFullHit = shortBar and low <= finalVAL
plotshape(longFullHit, title="Full Move Long", location=location.abovebar, color=color.green, style=shape.triangleup, text="FULL")
plotshape(shortFullHit, title="Full Move Short", location=location.belowbar, color=color.red, style=shape.triangledown, text="FULL")
// === Debug Diagnostics ===
if debugMode and (longBar or shortBar)
debugText = (useManualLevels ? "Manual Mode" : "Auto Mode") + " | TZ: " + sessionTZ + " | 80% Triggered | barsInside: " + str.tostring(barsInside)
label.new(bar_index, close, debugText, xloc.bar_index, longBar ? yloc.belowbar : yloc.abovebar, style=label.style_label_left, textcolor=color.white, size=size.small, color=color.new(color.gray, 70))