Backtesting

You need two things for a backtest:

  1. significant amounts of historical price data
  2. a set of trading rules to test (i.e. a trading system)

What you do, bar by bar of the historical price data, is use your trading system to determine whether you would have entered a trade, how much you would have bought, at what price, with what stop loss, and at what time.

You then work the trade through to its completion, at which time you start looking for the next time your trading system said you would have entered a trade.

At the end of the backtest you would have a list of theoretical trades. Each one would win or lose money. Remember these are trades you would have taken in hindsight.

Add up the win/loss amounts, and decide whether those trading system can be tweaked in any way to improve the theoretical performance. If you do tweak the system, go back and do the backtest again to see if the changes were actually better.

Doing backtesting is by no means a guarantee of future earnings though - markets can, and do, change personality.

Take this scenario though - you come up with a trading system, backtest it, and find that it consistently lost money. Would you use that trading system to trade real money?

If the trading system seemed profitable, the next step is trading it in real-time in a demo account.
 

Historical Price Data

All forex brokers' prices are slightly different to each other. So it's best, if you can, to backtest using price history from that particular broker.

You should also be careful of indicative price data. This is price data that can be described as "this is roughly what you would have paid". Currency prices are quoted in terms of both a bid price and an ask price. Indicative prices just take the average (I think). If you backtest using indicative prices, the spread would not be taken into consideration, and your backtesting results would appear more profitable than they actually should be.