Support
Press / to searchBacktest your EA in MetaTrader 5
ScripTrade checks and compiles the code, but it does not run backtests. You test the strategy on historical data in the built into , with your 's data. It takes a few minutes.
Open the Strategy Tester
Install the EA first (see Install in MetaTrader). Then, in MetaTrader 5, open View → Strategy Tester, or press Ctrl+R.
Choose the EA, symbol and timeframe
Select your EA in the Expert field, then the symbol and timeframe it was written for. Pick a date range of a few years that covers different market phases.
Choose how prices are simulated
Use “Every tick based on real ticks” when your broker provides tick history: it is the most realistic. “1 minute OHLC” is faster for a first pass. Set a realistic deposit and leverage.
Check the inputs
In the Inputs tab, review lot size, stop loss, take profit and the other parameters. They start from the values in your brief.
Run it and watch the trades
Click Start. Turn on visual mode to watch the EA trade bar by bar and check that entries and exits follow your rules.
What to look at in the report
- Total net profit: the result over the period, after the costs the tester simulates.
- Profit factor: gross profit divided by gross loss. Below 1, the strategy loses money.
- Maximal drawdown: the largest fall from a peak. Decide in advance how much you can accept.
- Total trades: with only a handful of trades, the result says very little.
- Maximum consecutive losses: how many losing trades in a row the account has to withstand.
A good backtest is not a promise of future profit. A strategy can be over-fitted to the past, spreads and slippage change, and your broker's history may differ from others. After the backtest, run the EA on a demo account for a few weeks before risking real money.
Want to change something? Ask for it in the ScripTrade chat, download the new version and run the same test to compare the two.
Can't find an answer?
Contact us