toptradersbotAcademy

Trading Strategies

The 20/50-Day Trend Filter

Was the 20-day average above the 50-day when a breakout occurred? We checked all 603 strong-volume trades. Those that started in an uptrend gained more on average, although the filter struggled in sideways markets.

BeginnerStrategy6 min read

In one sentence

When the 20-day average price is above the 50-day average, a token has been in an uptrend lately — and on our tokens that simple check separated better days from worse days, so use it to decide when to look for long trades, not as a signal to buy.

Why it matters

A breakout can look similar in a rising market and in a falling one. Recording the trend at entry lets us see whether those two groups behaved differently on our tokens.

The setup

  1. The 20-day average: the average of the last 20 daily closes. It follows price closely.
  2. The 50-day average: the average of the last 50 daily closes. It moves more slowly.
  3. The filter is on when the 20-day average is above the 50-day average at the daily close (00:00 UTC). That tells you recent closes have been higher on average.
  4. The filter is off in every other case.

What our test found on the daily candles of our 21 tokens:

  • The next day. On days when the filter was on, the average token rose 0.36% the next day. On the other days it fell 0.03%. That counts 16,620 token-days with the filter on and 19,741 with it off.
  • Breakouts. We grouped the 603 trades from the breakout test by the trend at entry. The 368 trades with the filter on averaged +5.5% after fees. The 235 with it off averaged +3.0%. After removing the best 3% from each group, the averages were +2.2% and +0.1%. Each trade ended at its stop or after 10 days.
Bitcoin from May 2024 to June 2025 with its 20-day and 50-day averages. Green areas are the days when the 20-day average was above the 50-day, so the filter was on.
Bitcoin from May 2024 to June 2025 with its 20-day and 50-day averages. Green areas are the days when the 20-day average was above the 50-day, so the filter was on.

How to use it

  • As a filter for long trades. Look for buy setups — breakouts, pullbacks, retests — mainly when the filter is on.
  • When it is off, either skip long setups or take them smaller and with a tighter plan. Breakouts outside an uptrend still gained 3.0% on average, but almost all of that came from a few big winners.
  • Not as a buy signal. We tested the filter as a condition, not the moment the two lines cross. Buying every cross is a different strategy with its own results; see the moving average crossover lesson.
  • Check it once a day. The filter only changes at the daily close. Checking it during the day just adds noise.
The left chart compares the next day's price move. The right chart groups our 603 breakout trades by trend at entry and shows their average return after fees.
The left chart compares the next day's price move. The right chart groups our 603 breakout trades by trend at entry and shows their average return after fees.

When it fails

  • Not every year. The days with the filter on were better in 5 of the 9 years from 2018 to 2026 (2019, 2021, 2023, 2025 and 2026). In 2018, 2020, 2022 and 2024 they were not: the filter is a small edge, not a rule of nature.
  • Sideways markets. In a range the two averages cross back and forth and the filter flips on and off. On the Bitcoin chart above, it switched five times between 25 May and 25 September 2024, and Bitcoin closed that stretch lower than it started ($63,152 against $69,291). Traders call this whipsaw.
  • It is late. Averages are lagging indicators: they confirm a trend after it has started. The filter turns on after the first part of a rally and turns off after the first part of a fall.
  • Sudden crashes. The filter can still show an uptrend during a one-day collapse. If price gaps below a stop, the exit can be worse than the planned level.

Crypto notes

  • Use daily closes at 00:00 UTC on a liquid spot pair, and use the same pair every time.
  • Altcoins usually follow Bitcoin. When Bitcoin's filter is off, many altcoin filters turn off soon after.
  • The filter was on for 46% of all token-days in our test. Being out of long trades more than half of the time is normal.

Check it with data

  • The Volume breakout signal shows "Uptrend: 20-day average above the 50-day" as one of its checks, next to the breakout checks.
  • Funding Rate and Open Interest: in a strong uptrend, very high funding and fast-rising open interest show a crowded market, where sharp drops become more likely. They were not part of our test.
  • Use the market structure view to check whether the sequence of highs and lows agrees with the moving averages. For a historical breakout, compare the averages as they stood on the entry day.

From my trading

When we built the Volume breakout signal in December 2026, we put the trend check on every token's signal page next to the breakout checks. A breakout with the filter on and a breakout with the filter off look the same on the chart, but on our tokens the first kind did clearly better.

Key points

  • Filter on: the 20-day average of daily closes is above the 50-day average.
  • On our tokens the next day averaged +0.36% with the filter on, against −0.03% with it off.
  • Of the 603 strong-volume breakouts, the 368 inside an uptrend gained 5.5% on average and the other 235 gained 3.0%.
  • Use it to decide when to look for long trades, not as a signal to buy.
  • It lags, it flips in ranges, and it helped in only 5 of 9 years: a small edge, not a guarantee.

Check yourself

1What does the 20/50-day trend filter tell you?

Show the answer

Answer: Whether it is a good time to look for long setups at all. The filter adds context at the daily close. Among the 603 trades in our sample, breakouts that started with the filter on gained more on average.

2In our 603-trade test, strong-volume breakouts inside an uptrend gained 5.5% on average. What was the average outside an uptrend?

Show the answer

Answer: 3.0%. The 235 trades outside an uptrend gained 3.0% on average after fees. Dropping each group's best 3% left 2.2% inside the uptrend and 0.1% outside.

Terms in this lesson

  • Backtest — Testing a strategy's exact rules on past price data to see how it would have behaved, including losing streaks, before you risk real money.
  • Breakout — When price moves and closes beyond a support or resistance level it could not pass before.
  • Downtrend — A period when price keeps making lower highs and lower lows, so the general direction is down.
  • Lagging Indicator — An indicator built from past prices, so it reacts after price has already moved. It confirms moves; it does not predict them.
  • Moving Average — A line that shows the average closing price of the last set number of candles, for example the last 50 days. It smooths out the noise so you can see the trend.
  • Simple Moving Average — SMA. A moving average that gives every candle in the period the same weight.
  • Trend Filter — A simple condition, such as the 20-day average being above the 50-day average, that tells you whether to take long setups at all. It decides when to trade, not where to enter.
  • Uptrend — A period when price keeps making higher highs and higher lows, so the general direction is up.
  • Whipsaw — When price chops sideways and keeps triggering signals in both directions, each one quickly reversed. It produces a series of small losses.