Tutorial

How to backtest a forex strategy step by step

A practical guide to testing your forex strategy candle by candle, with real examples inside Trade & Repeat.

Updated: October 2026 · Trade & Repeat

Learning how to backtest a forex strategy doesn't require coding or paying for desktop software. It requires a process you can repeat. This guide takes you through it step by step, from defining your rules to reading your final statistics, using the same workflow you can follow today inside Trade & Repeat.

Before you start: what you need

  • A strategy written down: entry condition, exit condition, position size and a risk management rule. Without this, you're improvising, not backtesting.
  • A forex pair and a timeframe chosen in advance. You'll find the full list of what's available in the complete guide to trading backtesting.
  • A Trade & Repeat account to log your trades (the 7-day free trial is enough to get started).

Get these ready and follow the steps alongside your own practice session.

See plans

Step 1: Choose your pair and timeframe

Start with the pair you've already spent the most hours analyzing. A major pair (EUR/USD, GBP/USD, USD/JPY) usually gives you cleaner history to start with than an exotic cross. For the timeframe, H1 (one-hour candles) and H4 (four-hour candles) are a good starting point: enough candles to build a representative sample without each session taking hours. If you already trade M15 (15-minute candles) live, practice on M15. The goal is to train on the same timeframe you'll later trade with real money, not a different one just because it's quicker to review.

Step 2: Pick a starting point in the price history

Start the replay on a date you don't remember. If you pick a stretch of the market you followed live, your brain will "remember" where price went, and that ruins the exercise. Choosing a period you don't recognize is the simplest way to avoid this bias. As a rule of thumb, pick a range of at least three to six months of history. That's enough to go through different market conditions (trends, ranges, high and low volatility) in a single practice session.

Step 3: Move forward one candle at a time, without looking ahead

This is the heart of manual backtesting. You review one candle at a time and decide using only the information you would have had at that exact moment in a live market. Peeking ahead, even by accident, is the most common way to ruin a well-intentioned backtest. That's why candle-by-candle replay exists: it's a safeguard, not a design quirk.

Step 4: Mark your entry, stop loss, take profit and result

Every time your rules give you a signal, mark the full trade: entry price, stop loss, take profit and, once it closes, the actual result. Treat it exactly as you would a real-money trade. It's the only way for the exercise to train your discipline, not just your analysis. Also write down, in one sentence, why you entered. That reason is what later lets you tell an execution mistake apart from a real flaw in the strategy.

Step 5: Repeat until you have a representative sample

With fewer than 30 trades, it's hard to tell a real edge apart from luck. Aim for at least that many before drawing conclusions, and get there with short daily sessions instead of a one-day marathon: spaced repetition is what helps build your execution. Ten or fifteen minutes a day, five days a week, can get you to that sample in a few weeks, without any session feeling like a chore.

A simple template for your backtesting journal

For every trade, always record the same five things. Logging them consistently is what makes your final statistics mean something:

  • The date and time of the candle you entered on (within the historical data).
  • Entry price, stop loss and take profit.
  • Why you entered, in one sentence (which rule was triggered).
  • The final result: win, loss or breakeven, and by how many pips or points.
  • A quick execution note: did you follow the plan exactly, or did you hesitate?

One daily session, even a short one, builds more of a habit than a weekend marathon.

See plans

Step 6: Review your statistics and decide

Once your sample is complete, look at your win rate, your risk/reward ratio and the shape of your equity curve together, not one at a time. We wrote a full guide on reading them without jumping to conclusions: how to read your backtesting statistics.

How to know your strategy is ready for a demo account

Before you move to a demo account, check these four points in your own journal:

  • At least 30 to 50 completed trades logged.
  • A win rate above the minimum your risk/reward ratio requires (see the breakeven table in how to read your backtesting statistics).
  • For every losing trade, you can explain whether it came from an execution mistake or a flaw in the strategy. If you can't tell, your log wasn't detailed enough.
  • You followed your rules exactly as you defined them at the start, without tweaking them halfway through the sample.

If you meet all four, the sensible next step is a demo account. That's where you'll face things backtesting can't fully reproduce, like slippage (getting filled at a worse price than the one you saw) and the pressure of watching prices move in real time.

Adapting the process to your trading style

The six steps above are the backbone; the details change with your style. If you day trade on M15, you'll build a sample of 30 to 50 trades much faster than on H4, but each practice session demands more sustained focus. If you swing trade on H4 or D1 (daily candles), each trade takes more candles to play out, so it's worth reviewing longer stretches of history (six months or more) to collect the same number of trades.

Full example: a real session on EUR/USD H1

The rule: go short when price breaks below a support level from the last 15 candles, with a stop 12 pips above the entry and a target 24 pips below it (a 1:2 risk/reward ratio). You start the replay on a stretch from about a year ago that you don't recognize.

Candle 12: price breaks support. You mark the entry, the stop and the target. You move forward one candle at a time, and on candle 19 price hits the target before the stop: +24 pips. You log the full trade in your journal, with the reason ("break of 15-candle support") and the execution note ("followed exactly, no hesitation").

You repeat the process over the next few days. After 40 trades, your journal shows 17 winners and 23 losers. That's a 42.5% win rate, above the 33% minimum a 1:2 risk/reward ratio needs to avoid losing money (see the full table in how to read your backtesting statistics). With that margin above breakeven, it makes sense to move the strategy to a demo account to test your execution in real time. That result describes the past; it doesn't mean it will repeat.

Mistakes that ruin a well-intentioned backtest

  • Peeking at future candles "just to confirm." It invalidates the whole session, not just that trade.
  • Changing your rules halfway through the sample because "they weren't working." At that point you're no longer testing a strategy; you're making up a new one as you go.
  • Leaving losing trades out of your log because they're tedious or painful to record. Your real win rate ends up inflated, and any decision you make afterward rests on false data.

We cover more general mistakes, not just execution ones, in the complete guide to trading backtesting.

Frequently asked questions

How long does a backtesting session take?
It depends on the timeframe and how many trades you want to collect, but a focused 30- to 45-minute session on H1 or H4 is usually enough for several complete trades. What matters isn't how long each session lasts, but how regularly you repeat it.
Do I need a demo account before I start backtesting?
No. Backtesting comes before the demo account, not after it. First you validate your strategy on historical data. Only once that checks out do you move to a demo account to test your execution in real time, with no capital at stake.
Can I backtest on my phone?
Trade & Repeat runs in your web browser, but marking entries and exits precisely, candle by candle, is much easier on a computer screen than on a phone. We recommend a computer for serious practice sessions.
What if my strategy performs badly in the backtest?
That's valuable information, not a failure. It's far better to find out by reviewing historical data than by losing real money. Change one variable at a time (your entry filter, for example) and run the sample again before you decide whether the strategy is viable.
How often should I repeat this process?
One backtesting session a day, even a short one, trains your execution far more consistently than long, occasional sessions. In fact, that's the idea behind the name Trade & Repeat.
Can I pause a session and pick it up later?
Yes. You don't have to finish the whole sample in one sitting. It's better to stop and come back the next day with a fresh mind than to force trades just to finish the session.
Should I backtest more than one pair at a time?
Not at first. Master the full process on a single pair before adding others. Mixing several pairs from the start tends to dilute your sample and makes it harder to tell whether the problem is the strategy or your execution.

Educational content only; it is not financial advice. Trading financial markets involves the risk of losing capital.

· Start today

Your next sessionstarts here

Pick a plan and start practicing in minutes, or log in if you already have an account.

· What is Trade & Repeat

Trade & Repeat is a backtesting tool that helps traders analyze, adjust and refine their strategies on real historical data before putting real money on the line. Our goal is to give every user a clear, measurable and repeatable process to validate their approach, build discipline and make evidence-based decisions.

TTrade & RepeatBacktesting for serious traders

© 2026 Trade & Repeat. All rights reserved.

The information and charts shown in Trade & Repeat are based solely on historical price data and are provided for educational and strategy simulation purposes. Although the data comes from high-precision institutional sources, the platform does not guarantee its absolute accuracy, completeness or real-time validity. Simulated or backtested results do not constitute financial advice, investment recommendations or a guarantee of future returns in real markets. Trade & Repeat EIRL disclaims any liability for financial losses arising from the use of this information in live trading.