Insights

How to Backtest a Claude Trading Strategy on Real MT5 Data

October 27, 20266 min read|By Trader.AI Team

Claude is good at careful reasoning — which makes it a natural partner for working through a trading idea. But reasoning about a strategy is not the same as testing it. Claude has no market data of its own to check the idea against.

Connect Trader.AI and that changes: Claude helps you shape the idea, Trader.AI turns it into exact rules and backtests it on real MT5 data, and Claude helps you understand what came back.

What you need

  • A Claude account.
  • A free Trader.AI account — you'll create it when you sign in during setup.

Once connected, Trader.AI works on claude.ai, Claude Desktop and the Claude mobile apps.

Step 1: Connect Trader.AI to Claude

  • Copy the MCP server URL from the Trader.AI MCP page.
  • In Claude, open Settings, then Connectors.
  • Add a custom connector, name it Trader.AI and paste the URL.
  • Sign in to Trader.AI when asked.

Step 2: Work the idea out with Claude

Mean reversion is a good example, because it sounds simple and hides a lot of decisions:

"On EURUSD, 15-minute chart: buy when price closes below the lower Bollinger Band and RSI(14) is under 30. Exit at the middle band. Same in reverse for shorts."

Ask Claude to challenge it before you test anything — what happens in a strong trend, where the stop should go. Then let Trader.AI make the rules exact. The stop, position size and what happens when price keeps falling all get pinned down, and the report lists every rule that was tested.

Step 3: Backtest it

Say: "Backtest this."

Free backtests cover all 8 timeframes, with years of history on the long ones. Pro goes up to 9 years on dates you choose.

Step 4: Read the losers, not just the winners

Mean-reversion strategies often show a high win rate and still lose money: many small wins, then one trend day that takes them all back. So look past the win rate to the payoff ratio and profit factor.

Then open the full report from the link Claude gives you and go through the trades with Claude:

  • "Which trades lost the most, and why did they close?"
  • "Did the big losses happen at a particular time of day?"
  • "What would a trend filter have changed?"

Every trade in the report shows the rule that opened it and why it closed, so you are reasoning about real trades — not guesses.

Step 5: Turn the insight into a new version

If the big losses came during strong trends, test the fix: "Only take trades when ADX(14) is below 20, then backtest again and compare with the previous version."

Each change is saved as a new version in your Trader.AI dashboard, so you can compare them side by side.

Step 6: Take it to MT5

On Pro, download the version you're happiest with as an MT5 Expert Advisor. It's built from the exact rules you tested.

Backtests are hypothetical and do not guarantee future results. Test on a demo account before trading real money.

Frequently Asked Questions

Does it work in Claude Desktop and on mobile?

Yes. Add the connector once in Claude's settings and Trader.AI is available on claude.ai, Claude Desktop and the mobile apps.

Can Claude see my backtest results?

Yes. The results come back to Claude through the connector, along with a link to the full report, where every trade is listed.

I use Claude Code. Is there anything different?

Claude Code can use the same MCP server, and the Trader.AI Agent Skill teaches it when and how to backtest. Both are on the MCP page.

Related Resources

More Articles

Ready to see verified AI trading in action?

Every Bot on Trader.AI publishes its complete trade history. No fake results. No hidden losses.

View Leaderboard