The Repaint Tax
Why your backtest might be flirting with the future
closed · forming · repaint
July 3, 2026 · 7 min read
Higher-timeframe filters are the silent killer of honest backtests. The base timeframe bar wants a HTF value. Pine's request.security with lookahead_on whispers future information into history.
Three modes, one ladder
- closed — base bars see only completed HTF candles. Harsh, trustworthy.
- forming — base bars see the HTF bar in progress (close = now). Matches live TradingView behavior.
- repaint — reproduces historical TV backtest inflation. Debug only. Live refuses it.
The deploy gate
We won't let you deploy live unless a saved backtest passed quality checks in closed or forming mode — never repaint. Profit factor, drawdown, trade count thresholds aren't gospel, but they're a forcing function: prove the strategy under causal HTF before real money.
What traders feel in the UI
Toggle HTF mode, rerun backtest, watch trade count move. That's the repaint tax made visible. If your edge only exists in repaint, you don't have an edge — you have a time machine rental.
Paper and live runners default to forming when someone loads a repaint config — same as watching the HTF candle build in TradingView, not as cheating history.