Forex backtester that runs in your browser
Build a trading strategy from blocks, then backtest it on historical one-minute price data before you trade it. Set your spread, starting balance and commission, see every trade on the chart, and export the same strategy as an Expert Advisor for MT5 or MT4, or a cBot for cTrader.
What is a backtest?
A backtest replays a fixed set of trading rules on past prices and records the trades they would have opened and closed. It answers one question: if this strategy had been running during that period, how would the account balance have changed? It is the quickest way to catch a rule that never fires, a stop loss that is far too tight, or a strategy that trades far more often than you expected.
A backtest cannot tell you what will happen next. Results are hypothetical, and a strategy that did well in one period can do badly in the next one. Read more in backtesting vs demo trading.
How to backtest a trading strategy in AlgoPuzzle
- Build the strategy. Connect blocks for the market, timeframe, entry condition, stop loss, take profit and lot size.
- Switch to Backtest. The header has a Build | Backtest switch. Your blocks stay as they are.
- Choose the period. Last week, month, 3 months, 6 months, year, or custom dates.
- Set your costs. Enter the spread in pips, the starting balance and, if your broker charges one, a commission per lot.
- Run it and read the results. Net result, return, maximum drawdown, profit factor, the trade chart and the full list of trades.
- Export it. Download the same strategy as an Expert Advisor (.mq5 or .mq4) or a cTrader cBot (.cs).
Test settings
| Setting | Options |
|---|---|
| Period | 1 week, 1 month, 3 months, 6 months, 1 year, or custom dates from 7 days to 1 year long, within the available history (up to the last 12 months). |
| Spread | 0 to 500 pips. A typical value for the market is filled in. |
| Starting balance | $100 to $1,000,000 (default $10,000, account currency USD). |
| Commission | $0 to $50 per lot, charged once per closed trade. |
| Markets | A list of popular markets, up to 5 in one backtest, on every timeframe the builder offers. |
How trades are simulated
- Entry rules are checked once per new candle, the same way the exported Expert Advisor checks them.
- A trade opens at the open price of the candle that has just started: buys at the ask, sells at the bid.
- Stop loss and take profit are checked minute by minute on one-minute price data.
- If the stop loss and the take profit could both have been hit in the same minute, the backtest assumes the stop loss was hit first, and the results say how often that happened.
- Trailing stops, break-even, exit conditions and trading hours follow the same rules as the exported strategy.
The whole method is described in How the simulation trades, and every result is explained in Reading backtest results. You can also run a Monte Carlo analysis to see how much the result depends on the order of the trades.
Free backtesting and Pro
| Free | Pro (one-time pass) | |
|---|---|---|
| Backtests | 5 a day | No daily limit |
| History | Up to the last 3 months | 6 months, 1 year or custom dates |
| Account | Free account, no card | From $12.99 for 30 days, no subscription |
The market data loads only for logged-in users, so even free backtests need a free account (email and password). See Pricing for every limit.
Backtester vs the MT5 Strategy Tester
The AlgoPuzzle backtest is a quick check while you build: no platform to install, results next to your blocks, and you can change a rule and run it again in seconds. The MetaTrader 5 Strategy Tester replays real ticks with your own broker's data, changing spreads and swaps. Use both: test ideas here, then confirm the exported Expert Advisor in the Strategy Tester with the "Every tick based on real ticks" model (how to backtest an EA in the MT5 Strategy Tester) and on a demo account. For other tools, see best backtesting software for forex traders.
Limits of this backtest
- One spread for the whole period; real spreads change and widen around news and market opens.
- Swaps (overnight financing) are not included.
- Real fills can be worse than the price the rule asked for (slippage).
- Very tight trailing stops are only a rough guide on one-minute data.
Frequently asked questions
Is the backtester free?
Yes, on the Free plan: 5 backtests a day on up to the last 3 months of history. You need a free account (email and password, no card) because the market data loads only for logged-in users. Pro is an optional one-time pass that adds 6 months, a year or custom dates and removes the daily limit.
Do I need to install anything?
No. The backtest runs in your browser on the strategy you built in AlgoPuzzle. You do not need MetaTrader or cTrader to run it, only to trade the exported strategy.
How far back can I backtest?
Up to the last 12 months, depending on how much history is available for the market: last week, month, 3 months, 6 months, year, or custom dates between 7 days and 1 year long.
Which markets can I backtest?
A fixed list of popular markets, shown in the backtest panel under More settings, Available data. A strategy can test up to 5 markets at once, on any timeframe the builder offers. Strategies on other symbols can still be exported and tested in MetaTrader's Strategy Tester.
Why do my results differ from the MT5 Strategy Tester?
AlgoPuzzle runs a quick simulation on one-minute data with one spread for the whole period. The Strategy Tester replays real ticks with your broker's own data, spreads and swaps. Small differences are normal; compare on the same symbol, timeframe and dates.