Loading…

RSI Reversion EA

The entry is a rebound out of the extreme, not a touch of it: RSI crossing back above the oversold level (or back below the overbought level) is the first sign the extreme has stopped extending, which is a materially different - and more common - signal than entering the instant RSI first touches the level. The exit is signal-based rather than a fixed price target: the position closes the moment RSI recovers back through a configurable midline in its favour, because that midline crossing is what the trade was actually betting on. A fixed pip take profit chosen without reference to RSI would be an arbitrary number bolted onto a signal-driven idea. A hard pip stop still protects every position even though the intended exit is signal-based. RSI can sit pinned in oversold or overbought territory through a genuinely strong trend rather than reverting, and a reversion trade with no price-based backstop against that scenario is the standard way these systems blow up - the stop exists for that case, not the normal one. Notes and limitations - Mean reversion assumes the range holds. In a strong trend RSI can stay pinned at an extreme for long stretches without ever reverting to the midline, which is what the protective stop is for - it will be hit more often than the signal exit in trending conditions. - Signals are evaluated once per closed bar, not on every tick. - One position at a time, tracked by InpMagicNumber. It will not manage or interfere with trades opened manually or by another EA. - Requires AutoTrading enabled and IsTradeAllowed() true; if trading is disabled the EA logs it and skips the entry.

Expert advisor · MT5 · v1.0 · Free

About RSI Reversion EA

RSI Reversion EA is an expert advisor (trading robot) for MetaTrader 5 based on RSI. It can size trades from your balance and risk percent. It has 12 settings, such as Rsi period, Oversold level and Overbought level. MQL source code included.

Files in the download: RsiReversionEa.ex5, RsiReversionEa.mq5, RsiReversionEa.txt.

Trading robots can lose money. Check every setting and test on a demo account before using real funds.

Settings

SettingDefaultWhat it does
Rsi period14RSI period
Oversold level30.0RSI level that defines oversold
Overbought level70.0RSI level that defines overbought
Exit level50.0RSI midline - closing the reversion trade signals here
Stop loss pips50Protective stop loss distance, in pips
Use risk sizingfalseSize by percent risk instead of a fixed lot
Risk percent1.0Percent of equity risked per trade, when risk sizing is on
Fixed lots0.10Lot size when risk sizing is off, or as a fallback
Magic number20260803Magic number for orders opened by this EA
Slippage pips3Slippage tolerance, in pips
Max retries5Attempts per trade action before giving up
Retry wait ms500Pause between attempts, milliseconds

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Experts.
  3. Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
  4. Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the expert advisor from the Navigator onto a chart, check the settings, allow Algo/Auto Trading and press OK.
  6. Test it first on a demo account or in the Strategy Tester.

Download the PDF guide

Tags: RSI · Buy/Sell Arrows · Risk & Lot Size · MT5 Expert Advisor · MQL5 Source Code

Expert advisors (EA) for MT4 & MT5 · PolyMaria