Backtesting a SuperTrend Trading Strategy Using Excel

Last Updated on September 15, 2023 by Mark Ursell

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.

To get a different perspective on the SuperTrend. See this recent article where I show how it can be profitable to reverse the indicator: A Forex SuperTrend Strategy.

The strategy was profitable over the period tested, and you can see the results below.

Trading Strategy

The criteria for the strategy are as follows:

Enter Long Trade

  • 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

Enter Short Trade

  • 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

Close Long Trade

  • 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

Close Short Trade

  • 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 also goes through the results and carries out a step-through analysis.

YouTube video

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.

Trade Long Y203 =IF(AND(F203>S203,F202<S202,F203>H203),”long”,IF(AND(F203>H203,F202<H202,F203>S203),”long”,””))

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

Long EMA Close AN203 =IF(AC203=”EMA close”,(F203-AD203)/(AE203-AD203)*AG203,)

Trade Short AO203 =IF(AND(F203<S203,F202>S202,F203<H203),”short”,IF(AND(F203<H203,F202>H202,F203<S203),”short”,””))

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.

MetricResult
Initial CapitalNumber of Winning Trades
Final Capital$1,386,579
Profit$1,286,579
Wining trades$6,858,641
Losing trades$-6,091,474
Profit Factor1.15
Number of Wining Trades639
Number of losing Trades1,600
% Winning Trades29%
Max Drawdown38%

Get More Winning Trades

Develop new trading strategies or get the best settings for your existing strategy.

Try an Online Version of the Tradinformed Backtest Model for Free Now