Forex

How to Backtest Your Forex Strategy Before Risking Money

How to Backtest Your Forex Strategy Before Risking Money

You have probably been told to test your trading strategy before risking money in live markets. You may have spent hours, days or even weeks manually scrolling through years of EUR/USD, USD/JPY or other forex charts, hand checking your strategy against market data. You may have even tried to use backtesting software, and found the features inadequate, or maybe you found it too overwhelming to learn the scripting languages required to use them.

We have all been there before and that is why we created Simula. Simula is a no-code backtesting platform that lets you build a strategy, validate it, and act on it in live markets with real-time alerts, all at an affordable price. It is backtesting software built for traders, not programmers.

But what exactly is backtesting software, and how can it help you today?

TL;DR

  • A backtest applies your trading rules to historical price data to show how a strategy would have performed. It lets you validate strategies using evidence rather than intuition.
  • Backtesting manually is very slow. Testing one simple strategy on three years of 1-hour USD/JPY data means checking more than 18,000 candles by hand.
  • A backtesting tool like Simula automates the work, giving you results in seconds.
  • Simula offers advanced features that many backtesting platforms do not, like Parameter Optimization, Monte Carlo Simulation, Walk Forward Analysis, and live alerts.
  • Two common pitfalls of backtesting are overfitting and hidden trading costs. Walk-forward analysis and realistic cost settings help you avoid them.
  • Simula offers all of these features without code, and you can try it free for 7 days.

1. What Is a Backtest, and Why Use a Backtesting Tool?

A backtest applies a set of trading rules to historical price data to show how a strategy would have performed. Backtesting lets you evaluate strategies objectively and build confidence in them, rather than leaving you to rely on intuition or cherry-picked results.

Take the following example. Suppose you trade USD/JPY on the 1-hour chart with these rules:

  • Enter a long trade when the 20-period simple moving average crosses above the 50-period simple moving average. (The classic Golden Cross)
  • Exit when the 20-period average crosses back below the 50-period average. (The Death Cross)

To test the strategy, you might review the past 36 months of price data and mark every point where your rules would have entered or exited a trade. You can then evaluate key statistics such as:

  • Win rate: the percentage of your trades that were profitable.
  • Maximum drawdown: the largest peak-to-trough drop in your account.
  • Total returns: how much your account grew or shrank over the period, measured in pips or as a percentage.

Together, these statistics help you judge whether a strategy is worth pursuing, because they show both the potential profit and the risk you would take to earn it.

Doing this by hand is an enormous task. Thirty-six months of 1-hour data contains more than 18,000 candles (forex trades roughly 24 hours a day, five days a week), and you would have to check each one against your rules, and manually keep track of the results of each trade. If you want to tweak your strategy even slightly, you have to start over, checking the 18,000 candles from the start.

This is where a backtesting tool like Simula helps: it automates the process for you. Simula will go through the 18,000 candles in a matter of seconds, and present an advanced set of metrics that would be near impossible to calculate by hand.

Simula strategy builder configured for a USD/JPY backtest with moving-average crossover rules for entry and exit.
Simula Backtest Strategy Builder

2. Advanced Features of Simula

Parameter Optimization

Simula does more than test a strategy on years of data in seconds, it can also help you optimize it.

Returning to our example, assume the 20/50 moving average strategy produces +600 pips across 200 trades over the 36 months. (A pip is the standard unit for measuring price movement. On USD/JPY, 1 pip equals 0.01.)

Now suppose the trader changes the moving average periods from 20/50 to 17/43, and the result improves from +600 to +800 pips. The 20/50 setting may have been a sensible starting point, but was it the best one? Could other combinations do even better? The only way to know is to test them all, and checking each combination takes a very long time, even using a backtesting tool.

Simula’s Parameter Optimization feature solves this by systematically testing different combinations of settings to find which performed best on historical data. Instead of guessing what the best combination of fast-average and long-average would work best on a Golden Cross, you could test every fast-average period from, say, 5 to 30 against every slow-average period from 40 to 100 and let Simula tell you which combination performs best.

Backtesting tools that do not include parameter optimization require you to test each combination one at a time. In the example above, that would mean more than 1,500 individual backtests.

With Simula, you set your entry and exit conditions, choose a start and end value for each parameter, and click a button. Simula tests every value and displays a heatmap of the best-performing combinations.

Optimization is a powerful tool, but it must be paired with validation on data your strategy has not seen. Without that, it can lead to a common backtesting pitfall, overfitting, which we cover in Section 3.

Simula optimization heatmap comparing total returns across combinations of two moving-average periods.
Parameter Optimization Heatmap

Monte Carlo Simulation

Simula also lets you run forms of analysis that are impractical to do manually. One of the most useful is Monte Carlo simulation, which tests how robust your backtest results are.

A backtest shows only one specific sequence of trades, and you may simply have been lucky with the order. Had the same trades occurred in a different order, a string of early losses could have caused a drawdown deep enough to wipe out your account before the winners arrived. The real market is unpredictable, so a positive backtest does not guarantee the same outcome in future trades.

Here is a simple illustration. Imagine ten trades: five winners of +100 pips and five losers of -50 pips, netting +250 pips. If the winning and losing trades alternate, your equity curve (the line tracking your account balance over time) climbs steadily. If the five losers all come first, you are 250 pips down before your first win. This could potentially wipe out your account if you are leveraged, and force you to abandon a strategy that would eventually have recovered and turned a profit.

Monte Carlo simulation addresses this problem. It takes the trades from your backtest and reshuffles their order thousands of times, rebuilding the equity curve each time. It uses your real backtest results, just in different sequences, and shows you:

  • How bad drawdowns could have been under less favorable trade sequences.
  • The probability of ruin, which is the percentage of sequences that fell below a threshold you define.
  • The confidence bands, which show how narrow or wide the range of outcomes was, and therefore whether your strategy is likely to deliver similar results in future or very different ones.

For example, suppose you define ruin as a 30% drop in your account. You reshuffle the 200 trades from your backtest 1,000 times, and 80 of the resulting equity curves breach that level. Your probability of ruin is 8%, even though your original backtest never came close. A result like this tells you the strategy carries more risk than the single backtest suggested.

Simula has Monte Carlo simulation built in and runs 1,000 randomized simulations of your trade sequence. It gives you an equity curve with confidence bands so you can see how robust your strategy is. You can also:

  • Adjust the ruin threshold to be more conservative or more lenient, depending on your risk tolerance.
  • Choose the resampling method: reshuffle your existing trades into a different random order, or resample them with replacement so that some trades repeat while others do not appear.

Monte Carlo equity chart showing the actual trade path, median path, and two shaded confidence bands.
Monte Carlo Simulation Equity Curve Confidence Bands

Live Alerts

Simula can also help you execute your strategy in live markets. Many backtesting platforms can validate your strategy, but then they leave the execution of that strategy all up to you. This puts you back into manual mode, glued to your screen watching the charts for entry and exit signals.

With Simula, you do not need to have forex charts open all day. You can set up alerts for your favorite strategies, and Simula will notify you via Telegram, Slack, Discord or push notification whenever a strategy enters or exits a trade. You stay in control: you place the trade with your broker, and Simula never trades on your behalf.

Simula alert setup with entry and exit toggles and delivery options for Telegram, Discord, Slack, and device push.
Setting up Alerts in Simula

3. Common Backtesting Pitfalls

Backtesting does not guarantee future performance. A backtest can show positive returns and the strategy can still fail in the live market. Two of the most common causes are overfitting and hidden costs.

Overfitting

Return to our USD/JPY example. Suppose the trader keeps adjusting the strategy using parameter optimization until the backtest shows +2,400 pips over the same 36 months, compared with +600 pips for the original 20/50 rules. All the trader has really done is fit the strategy to that specific period of price history. It has memorized the past rather than learned something that lasts, so it fails when conditions change. Traded live, it lost 300 pips in its first three months. This is known as overfitting.

It is easy to fall into this trap without proper validation. Simula’s walk-forward analysis helps you avoid it. Walk-forward analysis splits your data into rolling segments of in-sample data (the data used to design and optimize your strategy) and out-of-sample data (validation data your strategy has never seen). Using this method, you can test your strategies on data it has never seen, emulating how well the strategy would have held up in the actual market.

Hidden Costs

Backtests often ignore trading costs such as spreads, slippage (the difference between the price you expected and the price you actually get) and commissions. Each cost may look small, but they are charged on every trade and add up quickly, which can shrink or even erase your returns.

For example, in our USD/JPY strategy, a 0.8-pip spread plus 0.5 pips of slippage on each of the 200 trades costs 260 pips in total. That is about 43% of the original 20/50 strategy’s +600-pip profit, leaving +340 pips. A strategy that trades more often would lose even more.

With Simula, you can enter commission, spread and slippage percentages to see how these costs would affect your returns.

4. Trade on Evidence, Not Hope

A backtest is a powerful way to validate a strategy, but manual backtests are tedious and learning to code just to test one idea is time-consuming. That is why we created Simula, a no-code backtesting tool that makes it easier for traders to test their strategies before committing real money. With Simula you can:

  • Conduct parameter optimization: test a range of configurations for your entry and exit conditions to find the best-performing combinations.
  • Run Monte Carlo simulation: understand how robust your results are across different trade sequences.
  • Set realistic cost settings: enter commission, spread and slippage percentages to see how trading costs affect your returns.
  • Perform walk-forward analysis: validate your strategy across multiple time windows to guard against overfitting.
  • Receive live alerts: get notifications through Telegram, Slack, Discord or push notification whenever your strategy enters or exits a trade.

You do not need to know how to code to validate your strategies. Try the Simula 7-day free trial and see if it is right for you.

Tickers and topics