OPEN-SOURCE SCRIPT

Mean Reversion Setup LliterH

1 090
█ OVERVIEW
The Mean Reversion Setup LliterH is an institutional-grade algorithmic system optimized for high-timeframe trading on major indices (S&P 500, Nasdaq) and Gold (XAUUSD). This strategy identifies extreme statistical price dislocations and is specifically validated for the 4-hour (4H) and Daily (1D) intervals to reduce market noise and capture significant swing moves.

█ STRATEGY PERFORMANCE (Backtest 2006–2026)
In accordance with professional transparency standards, this strategy provides a robust statistical sample size of over 1,200 trades. The following metrics represent the "Risk-First" philosophy of this system:

Max Drawdown : 14.82% — This is the primary risk metric. Every trader must be psychologically prepared for this "dragon" before the equity curve ascends.

Profit Factor: 2.104

Win Rate: 73.05%

Total Trades: 1,232

█ THE LOGIC
The system operates on the confluence of price dislocation and internal candle weakness:

  1. Volatility-Adjusted Floor: Triggers when the price drops below a threshold anchored to the 10-period highest high and a 25-period average range.


Pine Script®


  1. Internal Bar Strength (IBS): Filters for entries where the close occurs in the bottom 30% of the bar's range, confirming exhaustion.


Pine Script®


  1. Regime Filter: Utilizes a 50-period Moving Average to block entries during structural downtrends, preventing "catching the knife" in bear markets.


█ EXECUTION & FEATURES

*Multi-Leg Exit: Features a momentum-based recovery exit (Leg 1) and an ATR-based trailing stop (Leg 2) to maximize profit during extended runs.

*Hard Stop Protection: A fixed $2 \times ATR$ emergency stop-loss protects the full position against extreme volatility.

*Automation Ready: Includes pre-configured alert logic for seamless integration with PineConnector (MT4/MT5)

█ RECOMMENDATION & COMPLIANCE

This script adheres to all TradingView requirements for professional publication. While the Win Rate is 73.05%, it is vital to respect the 14.82% Drawdown as the "cost of entry." Professional trading requires discipline during drawdown periods to achieve long-term statistical goals.


█ DISCLAIMER

Past performance is not indicative of future results. Trading indices and commodities involves significant risk of loss. This script is provided for educational and technical analysis purposes only. Always perform your own due diligence before live execution.

免責事項

これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。