Mean Reversion — BB + Z-Score + RSI + EMA200 (TP at Opposite Z) — Strategy by spyqdia

By spyqdia

Performance Metrics

Description

This is a systematic mean-reversion framework for index futures and other liquid assets.This strategy combines Bollinger Bands, Z-Score dislocation, RSI extremes, and a trend-filtering EMA200 to capture short-term mean-reversion inefficiencies in NQ1!. It is designed for high-volatility conditions and uses a precise exit model based on opposite-side Z-Score targets and dynamic mid-band failure detection.🔍 Entry Logic (Mean Reversion) : The strategy enters trades only when multiple confluence signals align:Long SetupPrice at or below the lower Bollinger BandZ-Score ≤ –Threshold (deep statistical deviation)RSI ≤ oversold levelPrice below the EMA-200 (countertrend mean-reversion only)Cooldown must be completedNo open positionShort SetupPrice at or above the upper Bollinger BandZ-Score ≥ ThresholdRSI ≥ overbought levelPrice above the EMA-200Cooldown completeNo open positionThis multi-signal gate filters out weak reversions and focuses on mature dislocations.🎯 Take-Profit Model: Opposite-Side Z-Score Target : Once in a trade, take-profit is set by solving for the price where the Z-Score reaches the opposite side:Long TP = Z = +ThresholdShort TP = Z = –ThresholdThis creates a symmetric statistical exit based on reverting to equilibrium plus overshoot.🛡️ Stop-Loss System (Volatility-Aware) : Stop losses combine:A fixed base stop (points)A standard-deviation volatility componentThis adapts the SL to regime changes and avoids being shaken out during rare volatility spikes.⏳ Half-Life Exit : If a trade has not reverted within a fixed number of bars, it automatically closes.This prevents “mean-reversion traps” during trending periods.📉 Advanced Mid-Band Exit Logic (BB Basis Failure) : This is the unique feature of the system.After entry:Wait for price to cross the Bollinger Basis (middle band) in the direction of the mean.Start a 5-bar delay timer.After 5 bars, the strategy becomes “armed.”Once armed:If price fails back through the mean, exit immediately.Intrabar exits trigger precisely (with tick-level precision if Bar Magnifier is enabled).This protects profits and exits trades at the first sign of mean-failure.⏱️ Cooldown System : After each closed trade, a cooldown period prevents immediate re-entry.This avoids clustering and improves statistical independence of trades.🖥️ What This Strategy Is Best For : High-volatility intraday NQ conditionsStatistical mean reversion with structured confluenceTraders who want clean, rule-based entriesAvoiding trend-day traps using EMA and half-life logic📊 Included Visual Elements : Bollinger Bands (Upper, Basis, Lower)BUY/SELL markers at signal generationOptional alerts for automated monitoring🚀 Summary : This is a precision mean-reversion system built around volatility bands, statistical dislocation, and price-behavior confirmation. By combining Z-Score, RSI, EMA200 filtering, and a sophisticated mid-band failure exit, this model captures high-probability reversions while avoiding the common pitfalls of naive band-touch systems.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView