All posts

Trend filters: knowing when to stand aside

By Quantomatic Team2 minute read

A trend filter does not predict direction. It tells you when conditions suit your rules and when to wait.

Trend filters: knowing when to stand aside

The problem in one sentence

An indicator repaints when it changes a signal after the fact. The arrow that looks perfectly placed on your historical chart was not there when that candle was forming, which means nobody could have traded it.

This matters because it breaks the link between what you test and what you can actually execute. A strategy can look disciplined in replay and fall apart the moment you trade it live, without a single line of its logic having changed.

Why it happens

Most repainting is not deliberate. It comes from three common causes:

  1. The indicator reads data from the current, unclosed candle, then revises itself when that candle closes.
  2. It uses a centred moving average or a similar calculation that needs future bars to compute a value for the present one.
  3. It looks back and relabels past pivots once a new high or low confirms them, which is honest analysis but useless as an entry signal.

The third case is the one that catches experienced traders. Pivot and structure tools often relabel by design, and that is fine for reading a chart. It is not fine as the basis for an entry.

How to check any indicator in five minutes

You do not need to read the source. Two tests will tell you most of what you need to know.

The replay test

Open the bar replay on your platform, rewind to a point where the indicator shows a clear signal, and step forward candle by candle. Watch the moment the signal appears. If it shows up only after the candle closes and never moves afterwards, the indicator is not repainting. If it appears mid-candle and shifts or disappears, it is.

The refresh test

Note the exact position of the last few signals on your chart. Reload the page. If any of them have moved, been added, or vanished, the indicator is recalculating history on load.

BehaviourWhat it meansSafe to trade
Signal appears after candle close and never movesFixed on closeYes
Signal appears mid-candle, then settles on closeProvisional until closeOnly after close
Signal moves or disappears after reloadRepaintingNo
Past signals relabel as new highs formStructural relabellingNot as entries

What to do about it

If an indicator repaints, you have two options. Wait for candle close before acting on any signal, which turns a repainting tool into a slower but honest one. Or replace it with something that fixes its output on close by design.

A signal you could not have acted on is not a signal. It is a description of the past.

Setting an alert that respects the close

On TradingView, the alert condition matters as much as the indicator. Set it to trigger on bar close rather than once per bar:

Condition: Quantomatic > Buy Signal
Options:   Once Per Bar Close
Expiration: Open-ended

"Once Per Bar" fires the moment the condition is true, which can be mid-candle. "Once Per Bar Close" waits. On a repainting indicator that difference is the whole ballgame.

The short version

Share this article

Questions, answered

It defines when your entry rules are allowed to fire. It does not predict the trend; it keeps you from trading against conditions your rules were not built for.

Yes, sometimes. That is the price of avoiding far more bad ones. Judge a filter over dozens of trades, not over the one it skipped.

Keep reading