How to backtest a forex strategy
Backtesting means testing a trading idea on past prices before you risk real money. With bar replay it feels live: the chart shows only what was known at that moment and you reveal one candle at a time. Here is a simple process that works for any strategy.
What a backtest can and cannot tell you
A good backtest shows whether your rules had an edge on that sample of the market, how often they trade, and how deep your losing streaks can get. That is valuable: it tells you what you are signing up for.
It cannot promise the future. Markets change, spreads and slippage cost money, and trading a demo is easier than trading with real fear. Treat a backtest as evidence, not as a guarantee.
Step 1: write your rules down
If a rule is not written, you will bend it. Before the first candle, write:
- The pair and timeframe you trade
- The exact entry trigger (what must happen before you click buy or sell)
- Where the stop goes, and why that place
- Where the target goes (many traders use 2R, twice the risk)
- How much you risk per trade, for example 1% of the account
- The sessions you trade, and what you do around high-impact news
Step 2: choose a fair sample
One lucky week proves nothing. Aim for at least 100 trades, spread over different market conditions: trends, ranges, quiet days and news days. Choose start dates at random instead of picking the days you remember, otherwise you only test the setups that worked.
Step 3: replay one candle at a time
- Start the replay at a random day and let the chart show only the past.
- Step forward one candle at a time. Never scroll ahead to see what happened.
- When your rules trigger, place the trade with its stop and target before you reveal more.
- Let the trade play out. Do not move the stop because you do not like the next candle.
- Write one line about why you took it. You will thank yourself later.
Step 4: measure in R, not dollars
One R is the amount you risk on a trade. A trade that makes twice your risk is +2R, a stop is -1R. Counting in R makes results comparable whatever the account size.
- Win rate: the share of trades that made money
- Average R per trade (expectancy): the most important number. Positive means the rules paid on this sample
- Profit factor: total profit divided by total loss
- Maximum drawdown: the biggest fall from a peak, in R
- Longest losing streak: can you live with it?
Step 5: find the leaks
The average hides the story. Split your trades by session (Asia, London, New York), by weekday and by setup. Many traders discover one session or one setup that loses money and drags everything down. Cutting it can change the result more than any new indicator.
Common backtesting mistakes
- Hindsight bias: peeking at the next candles, even once
- Too few trades: ten trades say almost nothing
- Over-fitting: tweaking rules until the past looks perfect, then failing on new data
- Ignoring spreads and slippage
- Changing the rules in the middle of a test
- Only testing the days that look easy
Backtest on MEEYONA
MEEYONA is a bar replay built for exactly this: real candles, hidden future, a long and short tool with a stop and target, results in R, a prop firm challenge mode, Insights by session and weekday, a pre-trade checklist and an AI review of your backtest. Start with the free demo, then save your tests with a free account.
Frequently asked questions
How many trades do I need for a backtest?
A common rule of thumb is 100 or more trades across different market conditions. With fewer, luck can look like skill. Quality matters too: follow the same rules on every trade.
What is a good win rate?
It depends on your reward to risk. With a 2R target you only need to win about 34% of the time to break even before costs. A high win rate with tiny targets can still lose money. Look at average R per trade, not win rate alone.
Is a backtest the same as live trading?
No. Live trading adds spreads, slippage, news spikes and emotions. Many traders backtest first, then trade a demo account, then go live with a small size.
Can I backtest without coding?
Yes. Manual backtesting with bar replay needs no code: you read the chart and trade it candle by candle, which also trains your eye.