Repaint-safe Engineering
By LuxAlgoMay 8, 2026
Repaint-safe Engineering is a working demonstration of repaint-safe engineering: one chart pitting naive indicator logic against the confirmed form a live trader could actually have acted on. A deliberately ordinary 9/21 EMA cross is marked both ways — naive circles as the condition computes, confirmed triangles one bar later and permanent. The same treatment covers a higher-timeframe close — the still-forming bar's value against the last completed one, divergence shaded — and swing pivots, marked where history draws them and where they became knowable.
How to Trade the Repaint-safe Engineering?
- Watch the flicker counter: naive markers can appear intrabar and vanish by the close; the live log counts each disappearance — flickers history keeps no trace of.
- Compare the HTF lines: the shaded span marks bars whose naive higher-timeframe value did not yet exist when they formed; the confirmed line accepts one bar of staleness instead.
- Respect pivot lag: each pivot is drawn 5 bars into its own past, with a dotted line spanning the gap to its confirmation point.
A four-row checklist documents the exact fix each confirmed element uses.
Repaint-safe Engineering Settings
- Average Type (default EMA), Fast Length (default 9), Slow (default 21) and Source (default close): the demo cross whose two forms are the subject.
- Higher Timeframe (default D): reference timeframe; must sit above the chart's.
- Pivot Length (default 5): bars required on each side of a swing pivot — the right side is the confirmation delay.
- Repaint Dashboard (default enabled) with Position (default Top Right) and Size (default Small).
- Display toggles cover each layer (all default enabled), and color inputs set the palette.
Frequently Asked Questions
Why do the pivot markers appear in the past?
Because a pivot is only knowable after its confirmation delay. Any swing structure shares this — a Williams Fractal confirms bars after the extreme it marks, just like these pivots. The retrospection is legitimate; the failure is acting as if the point were known on the bar history draws it on.
Are the naive signals useless, then?
No — they are the cost comparison. The naive marker is earlier whenever it survives; the confirmed marker arrives one bar later but is permanent. Keeping both lets the trade-off be measured rather than assumed.
Why are there no alerts on the naive layer?
An alert that fires on a condition that can later un-happen sends messages the chart will not remember. Every alert in this build reads closed-bar series only, so what reaches a notification matches what the chart still shows tomorrow.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.
