CME Basis Reversal EA
- Эксперты
- Версия: 1.0
- Активации: 10
CME Basis Reversal EA is an automated trading program for Gold CFDs on MetaTrader 5. It uses the difference between a referenced COMEX Gold Futures quote and the broker's XAUUSD CFD price to translate futures-based Round Number levels into the CFD chart's price coordinates. The entry logic seeks reversal trades when price crosses a translated Round Number level after a configured approach distance.
The EA is based on the RN Reversal and Recovery strategy. It combines entry filtering, state reconstruction, and recovery position management. Its on-chart dashboard displays the active trading sequence and data-source status.
How the trading logic works
1. Read Gold Futures reference quotes from an external quote provider and the current XAUUSD CFD price from MT5.
2. Calculate a futures-to-CFD basis (difference) from compatible quote timestamps.
3. Evaluate virtual price relative to 50-dollar Round Number intervals and a minimum approach buffer.
4. On a qualifying crossing, place an initial reversal order after spread and execution checks.
5. If a trade closes at a loss, use verified broker deal history and configured recovery settings to manage a recovery sequence.
6. Reconstruct the current sequence from the broker's trade history after EA or terminal restarts when the required records are available. If they are not, additional recovery orders may be blocked instead of relying on an unverified sequence state.
Main functions
- Futures-to-CFD basis calibration, with automatic GC contract selection.
- FastBull quote source with TradingView delayed-quote backup and last-known-basis handling.
- Round Number reversal entries with spread and approach-distance controls.
- Recovery sequence tracking, position sizing, and a money-based profit target.
- Trade-history reconciliation that considers profit, commission, swap and fees.
- Optional recovery lot cap, free-margin allocation and equity-loss threshold.
- On-chart trade status, basis/source information, and Recovery Log.
- Strategy Tester support using a manually specified reference basis.
Installation and first use
1. Install the Expert Advisor through MQL5 Market in MetaTrader 5.
2. Attach it to an XAUUSD chart on a compatible broker account and enable Algo Trading.
3. In Tools > Options > Expert Advisors, allow WebRequest for the HTTPS hosts api.fastbull.com and scanner.tradingview.com. Without suitable access to the external quote services, live basis updates may not work.
4. Verify the broker's XAUUSD symbol, digits, point size, trading volume steps, spread and contract specifications.
5. Configure the initial lot, maximum spread, stop loss, approach buffer, recovery limits and other risk parameters for the account.
6. First test on a demo account. Observe the dashboard, Experts and Journal messages, calculated basis, orders and the Recovery Log before considering live use.
Inputs and data limitations
The manual Diff input is used for Strategy Tester calculations or when the automated basis feature is disabled. Strategy Tester results use the entered basis value and do not reproduce the complete historical variation of the futures-to-CFD basis.
Live basis quotations come from third-party reference providers; they are not an official direct real-time CME data subscription. Availability, freshness, timing, contract mapping and access terms depend on those providers. During an outage, the EA may retain the last valid basis; this value can become stale. The EA does not currently analyze CME Open Interest, options positioning or order flow.
Risk disclosure
Recovery trading can increase position size and exposure after losses. A recovery sequence may fail, accumulate substantial floating losses, exhaust free margin or cause account liquidation. The optional equity-loss threshold is disabled by default and must be deliberately configured if required. There is no guaranteed gain or guarantee that previous losses will be recovered. Broker settings and market conditions affect trading outcomes. Historical tests and demonstration results cannot predict future performance.
This product is intended for users who understand automated CFD trading, futures-price references, external data dependencies and the risks of recovery strategies. The default parameters are optimized for Gold CFDs (XAUUSD). On non-Gold symbols, the EA uses price-scale-adjusted Round Number spacing and stop/target distances without applying the Gold Futures basis. Non-Gold behavior has not been validated by the published Gold research backtest and should be demo tested separately. A separate Nasdaq-specific product is not included. This is an independent product and is not affiliated with or endorsed by CME Group.
Historical strategy test illustration
The screenshots refer to a separate RN Rev15 Backtest V1.00 edition from 2020.01.01 to 2026.09.17 with a modeled synthetic futures basis. They do not represent tests of the current MQL5 Market version 1.00 binary. The test recorded a maximum simulated equity drawdown of 84.12%, and its results should not be interpreted as live trading or future expectations.
Broker volume compatibility: the EA checks each symbol's minimum lot, maximum lot and volume step. Initial orders may be adjusted upward to the broker minimum only within the configured InpMaxInitialLotAfterFit and initial margin-budget controls. A broker with higher minimum lot can substantially increase monetary risk. Recovery orders must also meet the broker's volume specification.
