This is the hands-on lesson for this module. You'll set up two versions of a channel breakout, replay the same two years of daily candles on TradingView with each one, and log every trade. By the end, you'll be able to compare the two versions on three things. How many trades each one took, how many lost, and the longest run of losses in a row. TradingView is the example, and the screens are simple drawings, so yours will look a bit different. Other platforms have similar tools.
1 of 9
What you'll learn
- Write two versions. Compare 20 and 10 with 55 and 20 on the same dates.
- Check your continuous chart. Note whether it is adjusted at each roll.
- Use yesterday's line. The built-in counts today, so compare with the day before.
- Log each trade. One row per trade, straight away.
- Compare the sheets. Trades, losses and the longest losing run for each.
Exercise
- Write Version A (20/10) and Version B (55/20).
- Replay two years of daily MES1! once for each, log every trade, and compare the trade counts, the losses and the longest losing runs.
Quick check
1. With the built-in channel, which line value do you compare today's close with?
2. Version B took 9 trades in two years. What can you conclude?
3. Why write both versions before replaying?
0 of 3 answered.
Finished this lesson?
Tick it off and keep your place
Read the full notes
To test a Donchian channel breakout yourself, write two versions with different channel lengths, replay the same two years of daily candles with each, and compare the trade counts, the losses and the longest losing runs.
- Write both versions first: market, How much time each candle covers, such as 1 minute or 1 hour.More in the glossary and dates; Version A (enter on a 20-day close, exit on a 10-day close); Version B (55 and 20); Buying first, to sell later. A long position gains if price rises and loses if it falls.More in the glossary and Selling first, to buy back later. A short position gains if price falls and loses if it rises.More in the glossary; entry and exit at the next open. MES1! is a A chart made by joining one futures contract month to the next at each roll, so years of history show as one line. It isn’t a contract you can trade.More in the glossary, which joins contracts at each Moving from a futures contract that’s about to expire to the next contract month.More in the glossary; note whether yours is adjusted. See Continuous charts and their gaps.
- On TradingView: click Replay, then Select bar and Select date in the replay bar, pick your start date, then Indicators, search Donchian Channels and add it twice. Set one copy's Length in its settings. A chart feature that hides the candles after a point you choose, then shows them again one at a time, so you can practise on past prices without seeing ahead.More in the glossary on each timeframe depends on your plan; other platforms have similar tools.
- The built-in channel counts today's candle, so compare each close with the line as it stood the day before.
- Log one row per trade straight away: version, entry date, side, entry, exit date, exit, points.
- Compare the two sheets on the number of trades, the number of losses and the longest A row of losing trades one after another, with no win between them.More in the glossary. A handful of trades is too small a How many trades a test is based on. A small sample can look very different from a larger one just by chance.More in the glossary to judge; Level 4 covers proper tests with costs.
Worked example
Made-up numbersReading two sheets
Made-up numbers · MES1! · daily · 2024 to 2025
- Version A (20/10): 22 trades, 14 losses, longest losing run 6
- Version B (55/20): 9 trades, 5 losses, longest losing run 3
A traded far more and had longer bad runs. B has too few trades to judge. Neither sheet says either version makes money.
Your turn
DrillVersion A's results in order: W L L W L L L L W L
Read more
Test it yourself: moving average crossover, and the trading guides Backtest sample size, Losing runs and Forward testing and replay.
Trading is risky. You can lose money. This lesson explains how a strategy is built and tested. It isn't advice, and it doesn't say the strategy works.