Mean Reversion Strategy (Open Source) by leebaez11
By leebaez11
Performance Metrics
- Author: leebaez11
- Symbol: VANTAGE:SP500
- Timeframe: 45 minutes
- Net P&L: +6,218.14 USD (+6.22%)
- Win Rate: 63.4%
- Profit Factor: 1.059
- Max Drawdown: 15,288.52 USD (14.01%)
- Total Trades: 716
Description
Hello traders! 👋 This is an open-source Mean Reversion strategy designed to capture extreme price corrections. I'm publishing this free version as part of my algorithmic development journey. Backtest it, provide feedback, and enjoy!Core Logic:The strategy buys deep "dips" based on two main criteria:Price Deepness: It calculates a dynamic "Buy Floor" by taking the Highest High of the last 10 periods and subtracting 2.5 times the 25-period Average Range. The current price must close below this line.Candle Weakness (IBS Filter): To avoid "falling knives," it uses an IBS (Internal Bar Strength) filter. The trade is triggered only if the daily candle closes in the bottom 30% of its range (IBS high[1]).⚠️ CRITICAL USAGE NOTE: This script is designed for the Daily (1D) Chart. If you use it on lower timeframes (like 15m or 1H), the "10 days" logic will break, and it will calculate "10 candles" instead, leading to completely different results. Use with extreme caution.🛠️ Adjustments & Customization:You can fully customize the lookback periods, multipliers, and IBS threshold directly in the inputs panel (settings wheel) to adapt the strategy to different assets.📊 Visual Interface:Dynamic Line: GREEN when waiting for a trade (searching for support). It turns RED once a trade is active (risk is on).Red Crosses: Mark your dynamic exit target (Yesterday's High) when in a trade.Green Triangles: Mark the exact entry points.🔴 RISK DISCLAIMER: Trading financial markets involves significant risk. This script is for educational and backtesting purposes ONLY and does not constitute financial advice. Past performance is not indicative of future results. ALWAYS conduct your own research before trading. 💡 **Credits & Inspiration:**The core mathematical concept for this mean reversion setup was originally shared by Reddit user 'vaanam-dev' in the r/tradingmillionaires community. I have taken their raw data concept and engineered it into this functional, visual, and open-source Pine Script indicator for the TradingView community to test and enjoy.