Lesson 9 · 10 min

Strategies and backtests

Turn the routine into rules you can write down, test them on past prices, and read the result without fooling yourself.

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
Step 1

A strategy is rules you can write down

“Buy when it looks cheap” is a feeling, not a strategy: two people would trade it two different ways. A strategy answers every question in advance: which market, which direction, where, what makes me act, where the stop and target go, and how big. If a rule cannot be checked on a chart with a yes or a no, it is not finished.
  • MARKETGold
  • DIRECTIONThe daily chart is in an uptrend: higher highs and higher lows
  • WHEREPrice pulls back into a 4 hour support zone
  • TRIGGERA 1 hour candle closes with a long lower wick inside the zone
  • STOPA little below the zone
  • TARGETJust before the next resistance, and only if R:R is at least 1:2
  • SIZERisk $10 per trade (lesson 7)
The routine from lessons 5 to 7, written as one rule. Nothing is left to feeling.
Step 2

Fit the idea to the market

Most strategies are built for one kind of market. A trend strategy buys pullbacks and loses money in a range, where every breakout fails. A range strategy sells the ceiling and gets run over by a trend. So the first rule of a good strategy is often a filter: trade only when the market is in the state the idea was made for.

TREND

RANGE

Left: in a trend, buy the pullbacks. Right: in a range, buy near the floor and sell near the ceiling.
Step 3

Three conditions: trend, location, trigger

Good rules usually have three parts, and each one removes bad trades. The trend keeps you on the stronger side, the location puts your stop close to a level, and the trigger makes you wait for proof instead of guessing. Leave one out and the strategy takes many more trades, most of them worse.
  1. Trend: the market is going your way, here higher lows.
  2. Location: price is at a level where your side stepped in before.
  3. Trigger: the candle that says now, here a long lower wick in the zone.
4,0504,1004,150123
Step 4

A backtest: the rules on past prices

A backtest runs the rules on past prices and writes down every trade they would have taken: where it entered, whether it hit the stop or the target, and what it made in R. At the end you get the numbers from lesson 8: how many trades, the win rate, the R:R and the result per trade.
4,1004,1204,1404,1604,180WLWLLW
Six trades: 3 wins of 2R and 3 losses of 1R. Result: +3R. Far too few trades to trust, but this is how every test is counted.
Step 5

Same result, very different ride

Look at the path, not only the total. The drawdown is the deepest fall from a high point to a low point along the way. Two tests can end on the same number, but one climbs steadily while the other sits through nine losses in a row. In real life most people abandon the second one in the middle of its drawdown, right before it would have recovered.

STEADY

ROLLERCOASTER

Both tests end on the same total. The red area is the drawdown: the fall from the last high.
Step 6

Live results come in lower

Expect a strategy to do worse live than in its test, for five reasons:
  1. Costs: the spread and fees are paid on every live trade.
  2. Slippage: around news, stops and entries fill at worse prices (lesson 10).
  3. Missed trades: you were asleep, busy or nervous when the signal came.
  4. Change: the market moves into a state the rules were not made for.
  5. Fitting the past: rules tuned again and again until they fit old prices perfectly often fail on new ones.

Prove it small. Run a new strategy on a demo account first, then at the smallest size, and compare the live numbers with the test after 20 to 30 trades. AiTradely can turn a rule written in plain words into a strategy and backtest it for you, which is what the practice below uses.

Watch out. A backtest is a test on the past. A strategy can work for a year and then stop working when the market changes. Never put real money on a backtest alone.

Words

New words in this lesson

Strategy
A set of rules that decides every part of a trade in advance.
Condition
One rule that must be true before a trade: trend, location or trigger.
Trigger
The event that says now, such as a candle closing with a long wick at a level.
Backtest
Running the rules on past prices to see what they would have done.
Drawdown
The deepest fall of the running result from a high to a low.
Overfitting
Tuning rules until they fit old prices perfectly, so they fail on new ones.
Check yourself

Test yourself

6 questions, 3 of them on a chart. Tap an answer to see right away if it is correct and why. You pass with 5 of 6; retry any time.

1Which of these is a strategy?
2The daily chart is in an uptrend and price is in a 4 hour support zone. Which candle is the trigger for a buy?
4,1004,1204,1404,1604H ZONEABC
3Three backtests end on the same total. Which would be easiest to stick with in real life?
A
B
C
4A backtest shows 12 trades with a great result. What does it tell you?
5Why do live results usually come in lower than a backtest?
6This test took 6 trades: 2 wins of 3R and 4 losses of 1R. What was the result?
4,1004,1204,1404,1604,180WLLLLW
Strategy libraryEverything you just learned, automated by AIPick a ready strategy from the library or describe your own. Every one is backtested, and the AI does the watching for you.Every strategy is backtested. The AI watches the markets and alerts you when one sets up.
1Pick a strategy or describe yours2See how it did in the backtest3Get an alert the moment it sets up
You confirm every trade.

Risk warning. Trading financial markets involves a high risk of loss and is not suitable for everyone. This course is education, not financial, investment or tax advice. The charts are drawn examples, not real prices or predictions. Past behaviour of a market does not guarantee what it does next. You make your own trading decisions.