Swing trading strategy: rules that hold for days
By Oalgo · Last reviewed
A swing trading strategy holds each trade for several days, so its rules usually read longer candles, often daily ones. Fewer trades mean each one carries more weight, and a short test can look very different from a long one.
What does a swing rule usually read?
#- A longer candle, such as a daily or 4-hour candle, which the builder offers.
- Slower averages, or a level set over many candles.
- An exit that can take days, so the drawdown during the hold matters as well as the final value.
What does a worked example look like?
#A rule reads daily candles and enters long when a candle closes above its 20-day average. It exits when a candle closes below that average, or at a stop 4 percent under the entry. On the chart the entry is on day 3 and the exit on day 8, a holding span of six days. The record lists the entry day, the exit day and the holding time, so the span can be checked against the candles.
Why a few trades weigh so much
#Eight trades a year give a short test only eight trades to judge. Read the trade count before any average, because a single unusual trade can move the whole picture. Overfitting makes this worse when the settings were fitted to the same few trades. Two or three years of daily candles give roughly 250 candles a year, which is a longer stretch than the trade count suggests.
Two rules, one label
#Two rules with one entry condition can still differ in the record once their candle sizes differ. A daily-candle rule that enters on a close above a 20-day average may hold for six days, while the same condition on hourly candles might close within a day. The test should state its candle size, so the two are never compared as if they were one rule.
What can a swing test not show?
#A multi-day hold gives the real-world factors more time to add up. Oalgo's terms list slippage and venue fees among the factors a simulation leaves out, so a clean swing record still leaves those costs open. A forward test adds new days, one at a time, and cannot shorten the wait for them.
On Oalgo the order is set. Your own words for the idea come first, then rules the AI builds and you check, then a backtest on past candles and a forward test on live prices with simulated funds. Go Live is the last step and is optional, on your own Live Strategy and your own Venue Account at a Supported Venue.
Read next
- Swing trading vs day trading vs position tradingDay, swing and position trading differ in how long a trade is held. See the differences in holding time, trade count and costs, and how to test each style.
- Moving average crossover strategy: rules and how to testA moving average crossover enters when a fast average crosses above a slow one. See the rules, the golden cross and death cross, and how to test them.
- What is drawdown? Maximum drawdown explainedDrawdown is the fall from your account's high point to a later low. See how it is measured, why recovering takes a bigger gain, and how to read it.