OPEN-SOURCE SCRIPT

Mean Reversion [SIMI]

262
This mean reversion indicator identifies extreme price deviations from the mean, providing high-probability reversal signals. Designed for confluence-based trading, it works best when combined with complementary indicators such as VWAP, price action, and volume analysis.

📊 Core Features
Signal Types

Prime Signals (Bright Green/Red Dots): Extreme reversions usually beyond ±1.5 SD - highest probability setups (you can customise this zone!)
Regular Signals (Dark Green/Red Dots): Standard reversions - moderate probability
Leader Line (Pink Dotted): Early warning indicator for potential reversals
Histogram Weakness: Momentum divergence signals

Normalisation Methods:

Institutional Hybrid (Z-ATR) (Recommended): Volatility-adjusted Z-score - adapts to changing market conditions
Percentile Ranking: Statistical ranking - excellent for ranging markets
PPO + ATR Hybrid: Percentage-based with volatility adjustment
Efficiency Ratio: Trend-strength weighted
ATR: Pure volatility-based
None: Raw Z-score

⚙️ Quick Setup Guide
1. Institutional Presets
Pre-configured parameter sets optimised for different timeframes:

5M Day Trading (5/21/5): Intraday scalping
1H Options Trading (6/24/5): Options-focused setups
1D Monthly Cycle (5/20/5): Swing trading

2. Signal Filtering

Prime Thresholds: Adjust ±1.5 SD to control signal quality (tighter = fewer, higher quality, adjust this zone per asset traded)
Dot Filters: Fine-tune entry zones (-0.03/+0.03 default - this ignores noisy signals near Zero line)
Volume Filter: Enable to require volume confirmation (1.4x average recommended, but fine tune yourself)

3. Advanced Filters

Dynamic SD Thresholds: Auto-adjusts for volatility regimes (tighter in low vol, wider in high vol)
Time of Day Filter: Avoids first 30 minutes, last 15 minutes, and lunch hour (11:30-13:00 EST)

💡 Trading Strategy Recommendations
Optimal Usage
This indicator is not intended as a standalone system. Use it for confluence alongside:

VWAP (institutional positioning)
Price action (support/resistance)
Options flow (institutional direction)
Volume analysis (conviction confirmation)

Signal Interpretation

Prime Signals: Wait for these for highest-probability entries - mean reversion may take hours to days
Manual Entries: Don't wait for dots - trade the ±2 SD zones directly using your own confirmation
Options Strategy: Prime sell signals at +2 SD make excellent short call setups; prime buy signals at -2 SD for long calls

Timeframe Guidance

Lower Timeframes (1M-5M): Higher noise - require additional confluence
Higher Timeframes (1H-1D): More reliable signals - suitable for options and swing trades
Best Results: Multi-timeframe analysis (check 1H and 4H alignment on 5M entries)


🔔 Alert System
Master Alert
Enable customisable alerts via the Master Alert System:

Toggle individual signal types (Prime Buy/Sell, SD Crosses, Leader, Histogram)
Receives bespoke messages with ticker, timeframe, and price
One alert condition handles all selected signals

Individual Alerts
Separate alert conditions available for Prime and Regular signals if preferred.

📈 Backtesting Notes
Important: Backtest results are date-sensitive and should not be the primary focus. Instead:

Dial in settings visually on your chosen asset
Aim for signals near actual tops and bottoms
Test different normalisation methods for your specific instrument
Optimise for signal quality, not backtest ROI

Asset Testing: Primarily developed using SPY, QQQ, and IWM as main assets to trade. Other instruments may require parameter adjustment - mess around!

Backtest Engine

Entry/Exit modes (All Signals, Prime Only, Early Signals)
Position sizing (percentage-based)
Slippage and fill method (candle close recommended)
Date range selection


⚠️ Best Practices

Always use confluence - never trade on MR signals alone
Start with Institutional Hybrid normalisation - most adaptive to market conditions
Focus on Prime signals for quality over quantity
Test on your specific asset - optimal settings vary by instrument
Longer timeframes = higher reliability - 1H+ for best results
Enable Time Filter on intraday charts to avoid volatile periods
Use Dynamic SD in highly volatile markets (earnings, FOMC, etc.)


🛠️ Troubleshooting

Too many signals: Increase Prime Thresholds or enable Volume Filter
Too few signals: Decrease Prime Thresholds or reduce Dot Filters
False signals: Enable Time of Day Filter and Dynamic SD
Signals don't align with tops/bottoms: Try different normalisation method


📝 Feedback & Development
Bug Reports: Please report any issues via TradingView comments or direct message.
Strategy Sharing: I'd love to hear how you're using this indicator and what strategies you've developed.
Open Source: Feel free to fork and modify this indicator. If you create an improved version, please share it with the community!

🙏 Acknowledgements
Developed through AI-assisted collaboration.
Special thanks to Lazy Bear for his open source MACD histogram (volume based).
Open source forever - use freely, modify, and share.
Happy Trading!

Remember: Past performance does not guarantee future results. Always manage risk appropriately.

Pandas rock \m/

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。