How it works

How Strategy X-Ray reverse-engineers a trading strategy

A transparent, step-by-step process: from raw trade history to a validated rule set and a forex EA you can backtest yourself.

1. Read the trade history

Connect an MT4 or MT5 account using its investor (read-only) password, account number and server, or upload a statement exported from the terminal (HTML, CSV or XLSX). We import closed trades, open positions, deposits and withdrawals, and normalise times to UTC using the broker’s server offset. A master password is rejected automatically — we can only read, never trade.

2. Free trading statistics

You immediately get a full performance report: absolute and relative gain, maximum drawdown, profit factor, expectancy, win rate for longs and shorts, average holding time, best and worst trades, balance and equity curve, monthly returns and breakdowns by symbol, hour of day and weekday.

3. Build hypotheses

The engine profiles the trading behaviour — holding time, active sessions, typical stop-loss and take-profit distances, position sizing — and builds candidate rule sets from a library of indicator templates (moving-average crosses, trend filters, RSI, Bollinger Bands, Donchian breakouts, MACD, Stochastic). AI models can propose additional rule sets from an anonymised behaviour summary; credentials never leave our servers.

4. Replay and match

Each candidate is replayed bar by bar on historical quotes with no look-ahead, and its simulated trades are matched one-to-one with the real ones. Parameters are optimised on the first 70% of the history; the remaining 30% is held out for validation. You see:

  • Match score on the held-out period (0–100)
  • Precision and recall — how many real trades are explained and how many simulated trades are extra
  • Baseline — the score random entries would get, so a good match can’t be luck
  • Confidence — Low, Medium or High, based on data volume and stability

5. Forward checks

Connected accounts are synchronised every 6 hours. New trades are compared with what the reconstructed strategy would have done, and the forward match score is updated automatically.

6. Unlock the algorithm and code

The result page shows roughly a third of the algorithm — the entry logic in plain language. Unlock the full description (exits, money management, exact parameters) and download commented source code for MQL4, MQL5, cTrader cBot or SharpTrader.

What it can and can’t do

Strategy X-Ray works best on rule-based, indicator-driven trading with enough history (at least 20 closed trades, ideally a few hundred). Discretionary trading, news-driven entries, copy trading from external signals or strategies that depend on data we can’t see will produce a lower match score and confidence — and the report tells you so honestly.

Try it on your own account

Statistics are free. A reconstruction costs tokens only when you run it.