What Chartnaut guarantees
A script on Chartnaut gives one answer for a given bar. The number on your chart, the number in a replay, the number a definition recorded when it ran over history and the number a study measured are the same number. This page lists what that covers and why it matters when real money follows the result.
The guarantees hold for scripts that follow the rules on Bars and clocks and declare their memory honestly (Warmup and memory). Where you can break one by accident, the page that owns it says how.
The promises
Guarantee | What it means for a bar at 14:35 on Tuesday |
|---|---|
Same answer in the browser and on the server | Your chart and a definition run over history compute the same value for it |
Same answer on every chart timeframe | A |
Same answer whatever you loaded | Scrolling back, reloading or opening the chart a week later leaves its value unchanged |
Same answer live, in replay and over history | The value you watched form is the value history records for it |
No look-ahead | Nothing computed for it reads a price that printed after it |
No repainting of confirmed bars | Once it closes, its value is fixed |
Honest about missing history | If the history behind it was cut short, the script is told and so are you |
Same answer in the browser and on the server
Chartnaut runs your script in two places: in your browser for the chart, and on Chartnaut's servers when a definition runs over history, when a study measures its events, and when an app computes. Both engines follow one set of rules for time grids, warmup, higher-timeframe buckets and when a level is taken out, and the rules are pinned together so a change reaches both or neither.
Why it matters: a study measures the events a definition recorded on the server. A Forward Insight then shows that study's numbers on your live chart, where the definition runs in your browser. If the two engines disagreed, the setup on your chart would be a slightly different setup from the one the statistics describe, and the win rate beside it would belong to something else.
Same answer on every chart timeframe
A higher-timeframe value is built from the chart's bars, so the question is whether those bars line up with the higher timeframe's buckets. On Chartnaut every pair of timeframes tiles exactly: every bucket grid starts at midnight UTC, including 4h, and weeks start on Monday. A daily bucket read from a 4h chart is the same UTC day as on a 5m chart. Lower-timeframe reads follow the same rule at the live edge: the 5m bucket still forming inside a 1h bar is not handed out as closed.
Why it matters: a daily level or a 1h trend filter that shifts when you change the chart's timeframe is a level you cannot trade from. You would be choosing between two answers to one question.
Same answer whatever you loaded
State that remembers (an EMA, a running high, a swing list) has to start somewhere. On most charting platforms it starts at the first bar that happened to load, so scrolling back or reloading moves every value computed after it. Chartnaut starts that memory from fixed points on a time grid instead. The start point for a bar depends on the bar's own time and your declared warmup, never on where loading began. Seams and anchors explains what this gives you.
Why it matters: a backtest is only as good as the values it read. If an EMA reads 101.20 on Monday and 101.35 on Friday for the same historical bar, one of those runs measured a price you never saw on your chart.
Same answer live, in replay and over history
The forming bar is recomputed on every tick, and it becomes the confirmed bar history records. When a live chart crosses a boundary of the time grid, Chartnaut recomputes from the fixed start point, so live values continue to match what a fresh run over the same bars produces. In replay, scripts see only the bars revealed so far; lower-timeframe buckets that end after the replay clock stay hidden.
No look-ahead
A higher-timeframe handle's
lastandbars(n)hold closed buckets only. The unfinished bucket isforming, named as such, and holds only what has printed up to the current chart bar.ctx.summarymeasures up to the last closed bucket.In replay the reveal boundary is the only clock.
Date.now()is refused in definitions and on the server. A script reads time fromctx.time.
Why it matters: the most common way a backtest flatters itself is a higher-timeframe value that already knows how the bucket closed. A daily high read at 10:00 that includes the 15:00 spike makes a breakout rule look clairvoyant.
No repainting of confirmed bars
A value on a confirmed bar is a function of that bar's time, the bars before it, your settings and the script. Nothing that happens later changes it: more history loading, a new bar arriving, a different chart timeframe or a server run. The forming bar moves until it closes, because the market is still printing it.
Two things do recompute confirmed bars, and both are visible: editing the script or its settings, and a change of plan that changes how far back memory reaches.
Honest about missing history
When the history behind a value was cut short, by your plan, by the instrument's first bar or by the platform's 2015 floor, the script can read it through history.truncated and reason, and the chart shows it beside the indicator. An indicator that declared history it has not received yet waits with "loading history" instead of drawing a provisional value and redrawing it later.
Why it matters: "all-time high" computed from three years of data is a three-year high. A script that knows that can say so.
Where most platforms fall short
Values repaint: a signal appears on a live bar, then vanishes or moves once the bar closes or the chart reloads.
Results depend on loaded history: the same indicator reads differently after scrolling back, so two traders on the same chart see different numbers.
Higher-timeframe values peek: a request for the daily close on an intraday chart returns the close of a day that has not finished.
The alerting server and the chart disagree: the alert fires on a condition the chart never showed, or the chart shows a signal the server never sent.
Odd bucket grids: a 4h bar that starts at 02:00 cannot tile a day, so daily values assembled from it are off by two hours.
Chartnaut's guarantees exist because each of these turns a study into a measurement of something you will never trade.
