# Backtesting a SuperTrend Trading Strategy Using Excel

As the name suggests, the SuperTrend technical indicator helps to identify market trends. This article introduces a SuperTrend trading strategy and shows how the strategy can be backtested using Excel.

If you want to know how to calculate the SuperTrend in Excel, see my previous article, How to Calculate the SuperTrend Indicator using Excel.

The strategy was profitable over the time period tested and the results can be seen below.

The criteria for the strategy are as follows:

• When closing price is above 200 SMA and crosses from below to above SuperTrend
• Or when closing price is above SuperTrend and crosses from below to above 200 SMA

• When closing price is below 200 SMA and crosses from above to below SuperTrend
• Or when closing price is below SuperTrend and crosses from above to below 200 SMA

• When either Profit Target or Stop-Loss is hit
• When trade is opened in the oppposite direction
• When closing price crosses from above to below 25 EMA

• When either Profit Target or Stop-Loss is hit
• When trade is opened in the oppposite direction
• When closing price crosses from below to above 25 EMA

## Video

The video explains the trading strategy and looks at the spreadsheets used for the backtest.  It is also goes through the results and carries out a step-through analysis.

## Excel Formulas

These formulas are based on a version of the spreadsheet in my Ebook course, How to Backtest a Trading Strategy Using Excel.  The cell references will depend on which data you are using in which columns.  However, once you understand the trading strategy that is being tested it should be easy to adapt the formulas to your own spreadsheet or backtesting system.

Long Close Below EMA AC203 =IF(AND(F203<I203,F202>I202,AI203=\$AI\$2,AB203=0,AA203=0,Z203=0),”ema close”,)

Short Close Below EMA AS203 =IF(AND(F203>I203,F202<I202,AY203=\$AY\$2,AQ203=0,AR203=0,\$AS\$2=1,AP203=0),”EMA close”,)

Short EMA Close BD203 =IF(AS203=”EMA close”,(AT203-F203)/(AT203-AU203)*AW203,)

## Results

The trading strategy was backtested on the EUR/USD forex pair on the 1-hour timeframe.  The backtest was carried out over three periods of 20,000 1-hour periods (3 years, 3 months).

I then combined these backtests and the results are shown in the table below.

Criteria Result
Initial Capital \$100,000
Final Capital \$1,386,579
Profit \$1,286,579
Profit Factor 1.15
Max Drawdown 38%

If you are interested in using Excel to backtest trading strategies my new Ebook course: How to Backtest a Trading Strategy using Excel is now available in the Amazon Kindle Bookstore.

If you are interested in backtesting and automated trading using MT4 have a look at How to Create an Expert Advisor for a SuperTrend Trading Strategy.

If you are interested in using Excel for trading purposes you may be interested in reading Calculating the Stochastic Oscillator.