RangeReaper
- Эксперты
- Версия: 1.0
1. Introduction
Range Reaper is a complete, rules-based algorithmic trading system for MetaTrader 5 that trades clean, high-probability range breakouts across an entire portfolio of instruments from a single chart. Instead of forcing you to attach and babysit a separate EA on every pair, Range Reaper manages up to eleven markets at once — Forex, Gold, Crypto, and major Global Indices — under one unified risk engine and one consistent strategy.
The core idea is simple and robust: markets spend most of their time ranging, and when they finally break out of a well-defined range with momentum, the move often continues. Range Reaper measures that range objectively using the Average True Range (ATR), waits for a confirmed break, and enters with a pre-defined stop loss and take profit sized to the instrument's current volatility. There is no martingale, no grid, no averaging down, and no hidden risk — every trade has a hard stop from the moment it is opened.
This makes Range Reaper suitable for a wide audience: professional traders who want a disciplined multi-asset core system, prop-firm traders who need strict daily and total drawdown controls, and serious retail traders who want a transparent, fully configurable EA they can understand and tune.
2. The Strategy in Detail
2.1 Range Measurement
For every enabled symbol, the EA continuously builds a trading range from the highest high and lowest low of the last N completed bars (default 20). It simultaneously reads the ATR on the M15 and M5 timeframes to understand current volatility. The range is only considered valid when its width, expressed in ATR units, falls inside a healthy band:
- Minimum range width (default 0.2x ATR) — rejects dead, flat ranges where breakouts are unreliable.
- Maximum range width (default 3.0x ATR) — rejects overly volatile, news-driven ranges where stops are likely to be hit by noise.
This quality filter is what separates a professional breakout system from a naive one: it only acts when the setup is clean.
2.2 Breakout Confirmation
A raw touch of the range boundary is not enough. Range Reaper requires price to clear the range by an ATR-based buffer (default 0.5x ATR) before arming an entry. This confirmation step filters out false breaks, stop-hunts, and low-momentum pokes that would otherwise cause repeated small losses.
When a valid break occurs, the EA arms the trade and, on the next tick, opens a position in the breakout direction (buy above the range, sell below it).
2.3 Entry, Stop Loss, and Take Profit
- Entry: Market order at the current ask/bid in the breakout direction.
- Stop Loss: ATR-based (default 1.5x ATR) placed on the other side of the range, so the stop adapts to volatility rather than a fixed pip value.
- Take Profit: ATR-based (default 3.0x ATR), giving roughly a 1:2 reward-to-risk ratio by default.
- Break Even: Optional move of the stop to break-even once price reaches 1R (default 1.0R), removing risk on winners.
- Trailing: Optional ATR trailing stop that activates after break-even (default off), letting winners run while locking in gains.
2.4 Position & Portfolio Management
Range Reaper does not just open trades — it manages the whole book:
- Monitors open positions for break-even and trailing logic.
- Enforces a force-flat time that closes everything at a chosen hour.
- Supports a portfolio-wide group close at a combined profit target, loss target, or trailing profit target, calculated in either dollars or percent of balance, and optionally including commission and swap.
3. Supported Markets (11 Instruments)
Each market is independently enabled and has its own configurable broker symbol name, so the EA works with any broker's naming convention:
| Asset Class | Default Symbol | Notes |
|---|---|---|
| Gold | XAUUSD | Metals |
| Crypto | BTCUSD | Bitcoin |
| Crypto | ETHUSD | Ethereum |
| Forex | EURUSD | Major |
| Forex | GBPUSD | Major |
| Forex | USDJPY | Major |
| Forex | EURJPY | Cross |
| Index | US500 | S&P 500 |
| Index | US30 | Dow 30 |
| Index | USTEC | Nasdaq |
| Index | DE40 | DAX 40 |
You can enable only the markets you want, rename symbols to match your broker (e.g. GOLD, SPX500, NAS100, GER40), and run a focused single-market setup or a full multi-asset portfolio.
4. Risk Management (Portfolio-Level)
Range Reaper treats the account as a whole, not trade-by-trade:
- Base risk per trade (default 0.5% of balance) — the starting point for lot sizing.
- Drawdown scaling — as total drawdown grows, all new lots are scaled down automatically, reducing exposure when the account is under pressure.
- Max total drawdown (%) (default 10%) — the hard ceiling; lots shrink as you approach it.
- Daily drawdown limit (%) (default 5%) — pauses new entries for the day after a losing session.
- Equity floor / ceiling ($) — stop opening trades below a floor or above a ceiling, ideal for prop-firm challenges and account protection.
- Max trades per symbol per day (default 3) — prevents overtrading a single instrument.
- Max concurrent symbols (default 11) — controls how many markets can hold a position simultaneously.
- Per-order hard lot cap — a fixed maximum lot per trade, independent of the risk calculation, so a single order can never exceed your comfort level.
5. Group Close (Portfolio-Wide Exit)
A signature feature for multi-market trading. Instead of closing trades one by one, Range Reaper can close the entire portfolio at once when a combined condition is met:
- Profit target — close all when total floating profit reaches a target.
- Loss target — close all when total floating loss reaches a limit.
- Trailing profit target — trail the combined profit and close if it retraces by a set amount.
- Dollar or percent mode — targets can be fixed amounts or a percentage of balance.
- Include commission/swap — optionally factor real costs into the P&L calculation for accurate results.
This is ideal for locking in a good day across all markets or cutting a bad one in a single action.
6. Sessions, Filters & Execution Control
- Trade window — define a start and end time (server time) for entries.
- Block outside hours — optionally reject entries outside the window.
- Force-flat time — automatically close all positions at a set hour (e.g. end of day).
- Max spread filter — skip entries when the spread exceeds a threshold in points.
- Max slippage/deviation — control allowable execution deviation.
- Per-market magic base — every trade is tagged so the EA can identify and manage exactly its own positions without touching manual or other-EA trades.
7. Display & Diagnostics
- On-chart dashboard — live status of markets, positions, and risk.
- Range boxes — optional visual drawing of the active ranges on the chart.
- Debug mode — detailed logging for development and troubleshooting.
8. Account Compatibility
- Netting and hedging accounts supported; hedging recommended for maximum multi-symbol flexibility.
- Any lot step / contract size — the EA reads symbol volume min/max/step and normalizes every order.
- Safe, Market-compliant code — sandboxed file I/O only, no DLLs, no network, no reading of terminal or other-EA files.
9. Recommended Settings by Use Case
- Conservative core portfolio: Risk 0.25–0.5%, MaxLot 4, all markets enabled, daily DD 5%, total DD 10%.
- Prop-firm challenge: Enable equity floor/ceiling, daily DD limit, force-flat time, and group close loss target.
- Single-market focus: Enable only one symbol (e.g. XAUUSD) and tune ATR multipliers for that instrument.
- Gold/Crypto intraday: Run on M5/M15 for best range quality.
- Indices: M15/M30.
Important: Set RR_MaxLot to match your account's leverage and deposit. On small or low-leverage accounts, a lower MaxLot prevents volume-limit rejections and keeps every trade affordable.
10. Event Handling & Architecture
Range Reaper is built on the standard MQL5 event-driven model:
- OnInit() — validates inputs, detects account mode, and initializes all enabled markets and indicator handles.
- OnDeinit() — cleanly releases indicator handles and resources.
- OnTick() — drives range detection, breakout confirmation, entries, and ongoing position management on every tick.
This architecture keeps the EA stable and responsive in both live markets and the Strategy Tester.
11. Why Range Reaper
- One EA, eleven markets — true portfolio trading from one chart.
- Volatility-adaptive — ATR-based ranges, stops, and targets.
- Disciplined risk — daily and total drawdown controls, equity rules, group close.
- Transparent — no martingale, no grid, hard stop on every trade.
- Fully configurable — every parameter grouped and commented.
- Broker-agnostic — custom symbol names for any broker.
12. Frequently Asked Questions
Q: Does it use martingale or grid? No. One position per setup, always with a hard stop. Q: Can I run it on just one symbol? Yes — disable the others and keep one enabled. Q: Netting or hedging? Both work; hedging is recommended. Q: Why do I see "Volume limit reached" in the tester? The lot is larger than the account can open. Lower RR_MaxLot or increase the tester deposit/leverage. Q: Which timeframe? Attach to any; the strategy reads M15/M5 ATR internally. Intraday (M5/M15) is recommended for best ranges.
