Day trading strategies: the rule types and how to test them
By Oalgo · Last reviewed
Day trading strategies are rule sets that open and close trades within one day. Most fall into a few rule types, and the type says what the rule waits for. Knowing the type tells you which check to run first, and which numbers to read with care.
Which rule types are there?
#- Trend: the rule waits for price to move one way for a while, then joins it. See the trend following strategy.
- Mean reversion: the rule waits for price to stretch away from an average, then expects a move back toward it. See the mean reversion strategy.
- Breakout: the rule waits for price to pass a level, such as the high of the last 12 candles. See the breakout strategy.
What does each type need in a test?
#| Type | What the rule waits for | What to check first |
|---|---|---|
| Trend | A direction that has held for a while | Whether the rule enters late, on past candles and on new ones |
| Mean reversion | A stretch away from the average | Whether the average was chosen by testing or by a fixed setting |
| Breakout | A pass through a level | Whether the level was known before the candle that triggered the rule. The lookahead bias check covers this. |
What does a worked example look like?
#Take one rule of each type, all on 5-minute candles. The trend rule enters after three higher closes. The mean reversion rule enters when price sits 1 percent below a 20-candle average. The breakout rule enters when a candle closes above the highest high of the last 12 candles. Written this way, each rule gives a time and a price, so the three can be compared on one chart.
Which type should a first test use?
#The question is which type you can state as one sentence and check against a chart. A rule with three conditions and a judgement call is harder to test than one with a single condition. Overfitting is the risk to watch in every type, since each rule has settings that can be fitted to past candles.
A second example: one level, two ways
#A breakout rule uses the highest high of the last 12 candles. If that level is taken to include the candle that triggers the rule, the rule is using a price it would not have had at the time. The test then looks better than the live rule could be. The lookahead check exists for exactly this case, and it takes one look at the rule's wording.
What can a rule type not tell you?
#A type names the idea, not the outcome. No type is better in every market, and a test on past candles shows only how the rule behaved on those candles. Each type can look good on one stretch of prices and poor on the next, so one test of one type proves little.
Oalgo starts from the rule you write in your own words. The AI builds it, you check it, and a backtest and a forward test run on simulated funds. Go Live is a separate step you may choose, with your own Live Strategy on your own Venue Account at a Supported Venue.
Read next
- 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.
- Mean reversion strategy: rules, example and limitsA mean reversion strategy enters when price is far below its average and exits as it comes back. See an example rule, when it fails, and how to test it.
- Breakout trading strategy: a Donchian channel exampleA breakout strategy enters when price closes above the highest high of recent candles. See the Donchian rules, false breakouts, and how to test them.