The backtest is the best you have built. The rule reads: mark each swing low, buy the next open, exit at the following swing high. Over six years on a basket of midcaps it returns something you would be embarrassed to say out loud, the drawdowns are modest, and the equity curve has the clean upward tilt of a system that has found something. You put it live in April with a small size, and by August it has done nothing at all like the test — not worse in an interesting way, just unrecognisable. Nothing is broken. The signals arrive; they simply arrive at prices you never saw in the test, several days after the bar the test bought on.
The chart is not showing you the past. It is showing you a drawing of the past, made this evening, with everything that has happened since. Most of what is on it could have been computed at the time. A few things could not, and the ones that could not are, with unhappy regularity, the most decisive-looking marks on the screen.
Standing in a range you cannot tell which ridge is the summit — every one of them hides the next. You can only name the highest point once you have walked past it and started descending, and by then you are somewhere else entirely. A map printed afterwards marks the summit with a triangle and gives no hint that the triangle was unavailable to anybody standing on it.
A swing high is a peak named from the plain. It is only a swing high once enough subsequent bars have failed to exceed it, which means the mark on your chart is always dated earlier than the moment it could first be made. Your eye reads the triangle as information that was on the mountain.
The four ways history gets redrawn
[[Repainting]] is the general name for an indicator or marker whose historical values change as later data arrives. The word gets used as an accusation, which is unhelpful — some of these are perfectly legitimate constructions being read wrongly, and only one of them is a defect. It is worth separating them, because the remedy differs.
| Kind | What it is | Is it a problem? |
|---|---|---|
| The unfinished bar | The current candle’s close, colour and both wicks are still moving. Every indicator computed on it is provisional | No — it is honest, and this track covers it separately. It becomes a problem only when a signal is acted on before the bar closes and then recorded as though it had closed there |
| Confirmed after the fact | Swing points, fractals, zigzag legs and the pivot labels built on them. A point is only marked once a set number of later bars has failed to exceed it | Not a defect in the indicator, and a serious one in a backtest. The marker is dated to a bar it could not have been placed on. This is the category that ruins strategies |
| Deliberately displaced | Ichimoku plots two lines forward and one line back. The forward ones were computed from data you already had, so they are known in advance. The backward one places today’s close at a location weeks earlier | No, if read correctly. The forward lines are causal. The line drawn backwards is today’s information sitting on an old date, and comparing it with the price there is a comparison across time, not a signal that existed then |
| Restated inputs | A bonus issue or a split arrives, and the vendor restates the entire price history so it is comparable. Every price before the event changes, so every indicator value computed over that history changes with it | Necessary and correct, and the one nobody calls repainting. Your chart of last month and your chart of that same stretch today are different charts, and any level you noted down in rupees is now in the wrong units |
Why the confirmed-after-the-fact kind is so costly
A [[Swing high]] has to be defined by something, and the usual definition is a bar whose high exceeds the highs of some number of bars either side of it. The bars on the left are available when the bar prints. The bars on the right are not. A [[Fractal]] marker in the common formulation needs two subsequent bars with lower highs, so it appears two bars late, always, by construction. A zigzag leg needs a reversal of a set percentage before it will fix the pivot, so on a quiet stock the pivot may be fixed a fortnight after the bar it is drawn on — and until it is fixed, the last leg on the chart can be erased and redrawn somewhere else.
The two that mislead without being wrong
- The displaced line. Ichimoku’s [[Chikou span]] plots the current close at a location well to the left of the current bar. Read as intended, it is a comparison — today’s close against the price some weeks ago — and it is a legitimate one. Read carelessly, it looks like a line that was above the price back then, and a rule written as “the lagging line was above price on that date” is a rule about information that arrived weeks after that date. The cloud plotted forward is the opposite case and causes no trouble: its values were computed from data you already had, which is precisely why they can be drawn ahead of the bar.
- The restated series. After a bonus or a split, an [[Adjusted price]] history restates everything before the event. This is correct and you want it — the alternative is a cliff in the series that generates a spectacular false signal — but two consequences follow. Every indicator value over that history has changed, so a chart you studied last month is not the chart you will open today. And every level you wrote down in rupees is now expressed in a different unit; a support at ₹1,240 noted before a 1:1 bonus is a support at ₹620 on the chart you are looking at, and your alert is still set at ₹1,240.
- Derived bar types inherit all of it. A [[Heikin-Ashi]] candle is computed from the previous Heikin-Ashi candle, so the whole series is path-dependent on where the platform started the calculation; two platforms with different history lengths produce slightly different Heikin-Ashi charts of the same stock. Whether a Renko chart’s newest brick can appear and then vanish depends on whether the platform builds bricks from closes or from intraday extremes. Neither is a defect. Both mean the historical chart and the live chart are not the same object.
Your chart marks a swing low at ₹412 on 14 March, using a definition requiring three subsequent bars with higher lows. Your backtest buys the next open, ₹415 on 15 March. What is wrong with that, and how would you establish it?
Match khatam hone ke baad commentator batata hai ki 34th over hi turning point tha, aur baat bilkul sahi hoti hai. Par 34th over ke waqt stadium mein kisi ko yeh pata nahi tha — pata tab chala jab match khatam ho gaya. Chart pe swing low ka nishaan bhi aisa hi commentator hai. Aapke rule ke hisaab se swing low tabhi maana jaata hai jab uske baad teen bar aur bane jinka low usse ooncha ho. 14 March waale bar pe ₹412 ka dot lagta hai — par woh dot 14 ko chart pe tha hi nahi, 15, 16, 17 ko bhi nahi. Woh 19 March ko aaya, jab teesra confirming bar bana. Backtest ne kharida 15 March ka open, ₹415. Aap se jaldi se jaldi 20 March ka open milta, ₹431 — ₹16, yaani 3.9% ka farq, sirf entry mein, aur jeetne wale trade ka average agar 6% hai toh edge ka zyada hissa yahin chala gaya. Exit bhi usi tarah der se confirm hota hai, toh dono taraf se ragda. Test ek hi hai aur pakka hai: data ko signal waale bar pe kaat do aur dobara compute karo. Nishaan ab bhi hai toh woh us din maujood tha; gayab ho gaya toh aap us par trade kar hi nahi sakte the.
- A chart is drawn this evening from all data to date; it is not a photograph of what was on the screen then.
- Swing points, fractals and zigzag legs are confirmed only after later bars print, so the mark is always dated before it could exist.
- Ichimoku’s forward-plotted lines are causal; the line plotted backwards places today’s close on an old date.
- A corporate action restates the whole adjusted history, changing every past indicator value and every level you wrote in rupees.
- Truncate the series at the signal bar and recompute — if the signal moves or vanishes, it was never available.
Mark it done to track your progress through the curriculum.