Extended Contracted RSI Trigger
- Experts
-
George Kamwanga
Hello Trader!
Looking for a good developer?
Hire me for your MT4/MT5 project: https://www.mql5.com/en/job/new?prefered=kamwangag6-gmail - Versione: 1.0
The Extended Contracted RSI Trigger is a systematic mean-reversion Expert Advisor engineered specifically for Gold (XAUUSD). It exploits the well-documented behaviour of ultra-short RSI(2): when price stretches into an extreme — extended above 80 or contracted below 20 — and then snaps back through that threshold, a high-probability reversion move frequently follows. A Simple Moving Average trend filter ensures every trade is placed with the dominant directional bias, not against it.
Entry logic
BUY CONDITION Price is above the SMA (uptrend confirmed) · previous RSI(2) was above 80 (extended) · current RSI(2) has dropped back below 80 (contraction trigger fires)
SELL CONDITION Price is below the SMA (downtrend confirmed) · previous RSI(2) was below 20 (contracted) · current RSI(2) has climbed back above 20 (extension trigger fires)
The one-bar lag is intentional: requiring the RSI to have already been beyond the threshold before the crossback reduces false triggers caused by transient spikes.
Trade management
Stop Loss — Fixed stop defined in points. Set independently per your risk tolerance and typical XAUUSD volatility.
Take Profit — Fixed target defined in points. Allows straightforward reward-to-risk sizing without trailing complexity.
Time-Based Exit — Configurable bar count. If neither SL nor TP is reached within N bars, the trade closes at market — preventing stale positions from accumulating overnight risk.
Input parameters
StopLoss_Points — Stop loss distance from entry in points TakeProfit_Points — Take profit distance from entry in points ExitBars — Maximum bars to hold a trade before time-based close SMA_Period — Lookback period for the trend-defining Simple Moving Average RSI_Period — RSI period (default 2 — the engine of the strategy) ExtendedLevel — Upper RSI threshold for the buy trigger (default 80) ContractedLevel — Lower RSI threshold for the sell trigger (default 20) LotSize — Fixed lot size per trade
Instrument & timeframe
Developed and optimised for XAUUSD (Gold vs USD). The RSI(2) mean-reversion edge is most consistent on intraday to daily timeframes — H1, H4, and D1 are the recommended starting points for further optimisation. Results on other instruments or timeframes are not guaranteed and should be validated independently.
Note: Backtest across multiple market regimes before live deployment. Trend filter parameters and threshold levels should be optimised for your chosen timeframe. Past performance does not guarantee future results.
Happy Testing!
