Never Miss the Jackpot with Backtesting in Forex!

Article 3 from 3

Now picture yourself about to purchase a new smartphone. You don’t just blindly throw your hard-earned cash at it, right? Nah, you check out those long lists of reviews and scrutinize every detail about its performance, features, and even the brand. 

backtesting-forex

Well, the same principle applies to trading. Because let’s face it, the golden strategy you might come up with will probably not work. This process is called backtesting. Every professional trader knows that backtesting  in forex is crucial when it comes to checking the effectiveness of a strategy. You must do it, too. Here’s how to do backtesting in forex!

So…What is Backtesting, and Why is It Important?

Backtesting is all about testing a trading strategy based on historical market data to check whether or not it would work in the past. Backtesting involves running the strategy through a simulated trading environment and observing how it would have performed in the past. By running it through the simulation, we can refine and optimize the strategy to fit the current market situation before we put it into action. 

Choosing the Right Backtesting Software/Platform

There are many forex trading simulators out there that use historical information on the price. It allows you to do backtesting effortlessly. Forex backtesting simulators can be categorized based on the granularity of the historical data they provide. Mainly, the historical price information is divided into two types:

  •  Minute-Based: The historical data is provided in minute-by-minute intervals. 
  • Tick-Based: The historical data is provided at the individual price ticks level. Many software programs and platforms are available for backtesting Forex strategies, both free and paid. Some popular ones include MetaTrader 4 and 5, TradingView, and ProRealTime. Just pick one that best fits your preference. 

How to Do Backtesting in Forex?

1. Pick Your Strategy

When it comes to strategy, there are a lot of options available that you can implement according to your preferences. For instance, traders can utilize various technical indicators such as chart and candlestick patterns, supply and demand zones, support and resistance levels, or trend-following tools.  But for the sake of learning, we will use one common approach: Moving Average (MA) crossovers.

A simple MA crossover strategy might look like this. So let’s say you pick two Moving Average, 30 Days MA and 60 Days MA, and try to find the crossover. When the 30 days MA crosses above the 60 days MA, that means we will take a long position, but when the 30 days MA crosses below the 60 days MA, we will exit the trading position.

2. Run it on the Backtesting Platform

This article will show how to implement backtesting on TradingView. The first thing you should do is choose the asset. The software will display the historical data of the price movements of that particular asset.  After that, you need to Input the strategy. 

To input the strategy, you must build the logic. This is where you will input the name and specify the date range between which you want to apply it. For example, you could define two moving averages of 30 and 60. Then define the conditions for entering a long position. In this case, the logic may look like this:

The logic for opening and exiting a long position:

  • Whenever the 30 days MA crosses above the 60 days MA, we will enter the long trade.
  • Whenever the 60 days MA crosses above the 30 days MA, we will exit the long trade.

The reverse happens for the short position:

  • Whenever the 60 days MA crosses above the 30 days MA, we will enter the short trade
  • whenever the 30 days MA crosses above the 60 days MA, we will exit the short trade

Apply it to the chart, and you should be able to see where the long trade and short trade are in the historical graph. Now, it’s time to do the backtesting. You can access the strategy tester. This is where you will see the overview, performance summary, and list of trades. 

3. Find faults and Fix Them

After running the backtesting, the next thing you want to do is check if there are any faults in the strategy and find ways to fix them. 

In the overview tab, you can see the strategy’s overall performance over time. You can also open the performance summary to see how each long and short position would perform. Check if the strategy is profitable by looking at the net profit generated and the profitability percentage since it shows how profitable the strategy is over time. Also, check if the number of closed trades is reasonable. Generally, you don’t want the number to be too big since it means you will have to pay a lot of commission to the broker. Beyond that, also pay attention to the maximum drawdown since it shows the highest drawdown happened by using the strategy in the testing period. 

If you find a problem, such as the profitability percentage or maximum drawdown, you need to evaluate what you might do differently to increase it. 

4. Re-Run the Backtesting

This is where you have to adjust your strategy and update the logic to fit the market conditions better. After that, re-run the backtesting and see if your changes improve your overall profitability. After you are sure about the strategy, you can implement it on your real account.

Those are the steps of conducting backtesting in forex and how to do it like a pro. Happy Trading!

Article Summary

Boost Your Earning.

Unlock Your Trading
Potential with Us.

OR

Stay Ahead of the Game with Our Weekly Newsletter!
Specifically Tailored for Your Level of Experience!
[sibwp_form id=2]

Aim for the sky, but move slowly, enjoying every step along the way. It is all those little steps that make the journey complete.

Paul Tudor Jones​