Backtest A Trading Strategy

Learning how to backtest a trading strategy is boring for most, but necessary for success. If you want to have confidence in your trading strategy, backtesting is the answer. Whether you have a mechanical trading system, some basic discretion, or human input into your trading approach, backtesting remains mandatory.

Our team at TSG has a pragmatic take on strategy backtesting. All of our trading strategies are thoughtfully backtested to prove to ourselves that we have an edge in the market.

Many traders have asked whether or not backtesting is useful?

Yes, it can be useful, especially if you use dedicated backtesting software. However, keep in mind there are also many limitations when you look at your trading strategy in hindsight. There are many different things you can’t incorporate when backtesting, so it can feel like real trading.

Obviously, backtesting is not live trading. You don’t have the emotions within your trading to properly show realistic backtesting results.

Nevertheless, backtesting remains an important part of achieving trading success.

Moving forward, we’re going to discuss the importance of backtesting. More importantly, you’ll learn how to backtest a trading strategy and measure its performance. We also have training for the best Gann Fan trading strategy, if you are interested in learning more strategies.

The Importance of Trading Strategy Backtesting

Trading strategy backtesting plays an important part in developing your trading strategy. However, backtesting is just the start because the immediate step is to forward test your strategy. The primary purpose of backtesting is to prove you have valid trade ideas.

If your Forex strategy has a proven edge, you’ll be more confident to pull the trigger when the next trade signal shows up. In other words, you’ll be able to better deal with the emotional side of trading. This is one of the biggest hurdles to conquer.

Another benefit of backtesting software is it helps you skip weeks and months of trading failure, depending on your time frame. You can go through a year’s worth of Forex price data in just a few minutes.

No matter what your trading rules are, you can use any backtesting software to test the reliability of your trading strategy.

The bottom line is, learning how to backtest a trading strategy can help your Forex results.

How to Backtest a Trading Strategy

How To Backtest A Trading Strategy

Make sure you have very specific rules for your Forex strategy. So you know exactly when to take the trade every single time you see it on the chart. That is the only way you’re going to be consistent in what you trade.

If you don’t have specific trading rules for your setups that you follow every single time you take a trade, it will be impossible for you to backtest your trading strategy.


There are two basic ways to backtest a trading strategy:

  • Automated backtesting – that’s dedicated to people who are good at coding. This is also the most efficient way to backtest a trading strategy because the backtest results are unaltered.
  • Manual backtesting – by which you go manually through the charts and find the trades that fit into your trading rules.

You need three things to analyze your trading strategy and hopefully create a million-dollar strategy:

  • The first thing you’ll need is the price data itself or a charting package.
  • Secondly, you need backtesting software or a program that can accurately manipulate the price data. Then apply your trading ideas to it.
  • Most importantly, you need an open mind to think of creative trading ideas to backtest.

For the purpose of this article, we’re going to use a double top and double bottom trading strategy.

So, now that we know what kind of strategy we’re going to be backtesting, we’re going to highlight the key components needed not just to backtest this kind of strategy, but the universal components used as a template for backtesting any type of strategy. Also, read bankers’ way of trading in the forex market.

Without further ado, this is how to manually backtest a trading strategy the right way. These are a few of the variables you want to keep track of:

What currency pair did we use to backtest our strategy?

Backtesting Software

First, we need to know which currency pair or what financial instrument spotted the double top/double bottom pattern.

Each financial instrument, or currency pair, has its own personality. The backtesting process can reveal which currency pair offers the most accurate and profitable double top/double bottom patterns. Here is another strategy called Time-Based Trading Strategy.

The date you spotted the chart pattern

Backtesting Trading Strategies Free

We definitely want to know the date of the trade that we’ve spotted.

Some days tend to be more volatile. Through trading strategy backtesting, you might find what the best days for these patterns are.

If you find enough, strong evidence that certain days produce better results for the double top/double bottom pattern, you should focus more to take the trades during those days with the best potential.

Time of the day

How To Backtest A Trading Strategy Using Excel

We need to know the time of the day we took the trade as well. The same as not every trading day is created equal the same holds true for the time of the day.

For example, the Forex market can be divided into four major trading sessions. Your backtesting results should show you what the best Forex trading session is.

Is it the London session?

Or, maybe it’s the New York session?

These are all important backtesting parameters that need to be tested.

Stop Loss and Profit Targets

Trading Backtesting Software

We probably want to know the stop loss, the profit target, and the number of pips that we’ve made or lost on the trade.

While the stop loss is pretty much rigid we can backtest different take profit strategies. You can be creative and use your trading experience to find the best trading strategy.

Rules for the entry strategy

You want to make sure that you have very strict trading rules for your trade setup. For the purpose of this article, as we already mentioned, we’re going to backtest the double top/ double bottom chart patterns as our main trading strategy.

Rule number one for our double top pattern is that on the retest of the first high the wick must at least touch the top of the body of the previous swing high.

Allow us to zoom on a price chart and show you what we mean by that:

How To Backtest Trading Strategies In Mt4

Our second rule for the double top is that the body of the retest can’t close above the wick of the previous swing high.

Backtest Trading Strategies In Mt4

We hope the rules make sense. They are the same for the double bottom chart pattern.

Now we have a specific set of rules that we can follow and which will tell me when a double top/double bottom pattern was created. This gives us something that we can test.

The next step is to figure out how we’re going to enter the market if these specific trading rules are met.

Are we going to enter on the close of the second candle top?

Are we going to wait for a small retracement? Or, are we going to do the most common thing and wait for the break of the neckline?

Backtesting Example

These are all valid entry criteria that can be backtested and see which one yields a better profit outcome.

Now, that we have created our entry techniques we need a stop and take profit strategy.

We can place our protective stop loss above the double top because a break above will ultimately invalidate the level. When it comes to the best stop loss strategy we can be more flexible and backtest all kinds of take profit variations.

Best Way To Backtest Trading Strategies

Now we have a framework and we know exactly how we’re going to trade this every single time it happens in the market. For this specific strategy, this is pretty much everything we need to backtest this Forex strategy.

At the end you should have a backtesting spreadsheet where you should manually record all the inputs, the same as in the figure below:

Backtesting Trading Strategies In Excel

Now, back to the charts try to find some of these trading example and record them in the backtesting spreadsheet and see if you can find an edge.


Trading strategy backtesting requires manipulating the backtesting parameters in order to find the most promising trading strategy. This way you’ll ensure that you maximize your profits on your trading ideas. No matter how you put it backtesting is vital for determining the viability of a trading strategy. You can also read our winning news trading strategy.

If you want to be able to execute your trades with confidence you need to learn how to backtest a trading strategy.

Thank you for reading!

Please leave a comment below if you have any questions about trading strategy backtesting!

Also, please give this strategy a 5 star if you enjoyed it!



Please Share this Strategy Below and keep it for your own personal use! Thanks Traders!

How To Backtest A Trading Strategy

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Leave a Reply

Your email address will not be published. Required fields are marked *

Disclaimer: Trading foreign exchange on margin carries a high level of risk, and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. No information or opinion contained on this site should be taken as a solicitation or offer to buy or sell any currency, equity or other financial instruments or services. Past performance is no indication or guarantee of future performance.

x  Powerful Protection for WordPress, from Shield Security
This Site Is Protected By
Shield Security