Supertrend strategy: rules and how to test it
By Oalgo · Last reviewed
A Supertrend strategy follows the side of the Supertrend line. A common rule is to enter when the close crosses above the line, which is when the line flips from above price to below it, and to exit when the close crosses back below it.
What are the rules of a Supertrend strategy?
#- Entry: the close crosses above the Supertrend line (settings 10 and 3).
- Exit: the close crosses back below the line.
- Settings: a larger multiplier keeps the line further from price, so it flips less often. A smaller one flips sooner.
- Stop: a Stop Loss as a percentage. The line itself trails price, and a stop can follow it, in a test and in a Live Strategy.
How do you write this strategy in Oalgo?
#In Oalgo you can tell Oalgo AI your Supertrend rule in your own words, check the rule it builds, and test it. After testing, if you choose, you Go Live with your own Live Strategy on your own Venue Account at a Supported Venue.
For example, you could tell Oalgo AI: "Enter when the close crosses above the Supertrend line (10, 3). Exit when the close crosses back below it. Use a 2% Stop Loss and a 4% exit target." These numbers are examples to change. A Live Strategy needs a stop on each side it can enter, and an exit target is optional. The example names both.
How do you test this strategy honestly?
#- Run a backtest on more than one date range, including a sideways one.
- Check the fees and the number of trades. In a sideways market price crosses the line again and again.
- Change the multiplier and the period a little. If the report changes a lot, the first result may be fitted to one period.
- Run a forward test on new prices, with simulated funds.
What can a Supertrend strategy not tell you?
#Supertrend only follows price, so every flip comes after the turn has started, and the exit comes after price has already moved back. It does not say how far a trend will run. The line can sit far from price, so the fall between the entry and the exit can be large. The trend following page compares this rule with other trend rules.
Read next
- Supertrend indicator explained: how it worksSupertrend is a line built from ATR that sits under price in an up-move and over it in a down-move. Learn how it works, how to read it and how to test it.
- Trend following strategy: rules and how to test themA trend following strategy enters in the direction of a trend and exits when it ends. See the common rules, where each is explained, and how to test them.