A marker visible on a historical low today does not prove it was visible when that low formed. Record both its plotted candle and the first time the signal could be known. Preserve inputs before explaining a changed display; neither one difference nor a short unchanged sample settles every behaviour of an indicator.

Separate calculation, drawing and availability

Pine documentation distinguishes historical and realtime behaviour. An open bar can change; a pivot marker can be added to an earlier candle only after later confirmation. Closing the chart bar does not automatically close a higher-timeframe bar used by the script.

First establish the declared rule: provisional or confirmed, required inputs and possible later relocation. “Non-repaint” alone is not a complete specification. A changed image needs an explanation, but it does not by itself prove deception, look-ahead or a financial loss.

Investigate the specific mechanism

MetaQuotes warns that the last ZigZag segment can change as new data arrives. Its parameters and implementation determine the construction; do not substitute a universal percentage rule. Check provisional-versus-confirmed behaviour separately for other tools such as Parabolic SAR.

MQL5 documents a reset of prev_calculated when deeper history loads or gaps are filled. A saved indicator buffer is therefore not a guarantee of permanent invariance. Keep the input export and program version before attributing a post-restart difference to deliberate rewriting.

Look-ahead occurs when a test assigns a decision earlier than availability of its required information. Deliberately backplotting a later-recognised point is a drawing convention; treating it as an earlier executable signal introduces the timing error. Examine recognition and fill prices separately.

Keep observations that later charts cannot overwrite

Choose one instrument and configuration. Append new records without replacing old ones to match the latest display. A screenshot should show instrument and time scale; it complements an input/output export rather than replacing it. Apply the same evidence discipline when evaluating paid signal services.

Record the observation before explaining it
FieldKeepPurpose
EnvironmentSymbol, feed, interval, clockCompare the same series
ToolVersion, parameters, code if availableSeparate updates from old-version behaviour
ObservationRecord time, candle time, open/closed stateEstablish information availability
SignalValue, direction, plotted candle, first-seen timeAvoid assigning an earlier entry
ComparisonSame fields after later closes and reloadIdentify exactly what changed

Observe during formation, after chart-bar close, after any required higher-timeframe close and after reload. Change one element at a time. Record gaps in observation: lack of a saved signal is not proof that none appeared.

A 10:10 pivot first known at 10:25

Use an explicit fictional M5 rule: High must be strictly greater than the Highs of two completed bars on each side; equality fails. Times denote bar openings, with continuous data and no gaps. This is an assigned model, not an audit of a named commercial tool.

Two lower neighbours on each side
M5 opensHighAvailability
10:001.1000Insufficient data for the selected point
10:051.1010Candidate still ahead
10:101.1040At 10:15 candidate closes; no right neighbours yet
10:151.1030At 10:20 first right neighbour closes
10:201.1020At 10:25 second right neighbour closes; confirmation

High 1.1040 exceeds all four neighbours. At 10:25 a marker can be drawn at 10:10, but the information became available ten minutes after that candle closed, or fifteen after it opened. These are different reference times for the same delay.

Assume the first possible sell Bid after confirmation was 1.1018. Assigning the historical High 1.1040 as an earlier sell entry adds 0.0022, or 22 pips at pip 0.0001. For exposure 10,000 EUR, that is 22 USD difference in price P/L before fees. No exit was supplied, so this is not a calculated trade profit.

Change only the 10:20 High to 1.1045: the selected 1.1040 no longer qualifies. Equality at 1.1040 would also fail the strict rule. The higher neighbour is not itself a confirmed new pivot without its own required right-side data.

A different reloaded result need not mean future data was used

A saved export has closes 100, 102, 104, so SMA(3)=102. A later export of the same moments has 100, 102, 101, giving SMA(3)=101. The final input price changed. An algorithm using only earlier data can still produce a different result.

Scroll sideways to see the full diagram

An input value changes while the SMA formula stays identicalBoth series share 100 and 102. The third price was 104, then 101 in the second export. Means 102 and 101 differ because inputs changed, not because future data was added to unchanged history.Compare the input prices first100102104101Version A:(100+102+104)/3=102Version B:(100+102+101)/3=101Input changed; the SMA formula did not.
Connections show prices from two export versions, not two different algorithms.

Check matching timestamps and price fields, export consistency, indicator version and settings. A future-data append test requires unchanged earlier inputs. A changed export needs a separate diagnosis; this example does not prove the whole program is correct.

Assumptions: Fictional data versions for the same three completed intervals. No cause for the revision or real provider is identified. Formula or data reference: MQL5: history changes in OnCalculate.

Append tests, alert copies and replay have distinct scopes

Compute a completed prefix, append later observations without changing earlier prices, then compare outputs presented as final. A toy rule dividing each price by the maximum of the entire loaded dataset changes its first result from 100/110 = 0.9091 to 100/120 = 0.8333 after appending 120. The earlier price 100 never changed; the decline of about 0.0758 reveals future dependence despite no negative index.

A running-maximum version gives first value 1 in both runs. By contrast, the diagram’s exports 100,102,104 and 100,102,101 change SMA(3) from 102 to 101 because an earlier input was revised. An append test requires unchanged earlier inputs. Passing one prefix check does not prove all code paths correct.

TradingView server alerts retain their creation-time script and settings; later chart edits do not update that copy. Record the alert configuration, trigger frequency and message time. Existing server alerts continue using realtime data during Bar Replay; they are not notifications from the replayed past.

At 10:15 on M5, the hourly 10:00–11:00 bar is still open. Its final High is not available merely because an M5 bar closed. Pine lookahead settings and series offsets require joint analysis. Once availability is specified, move to backtesting with data and costs and walk-forward evaluation. The broader technical-analysis material complements that workflow.

Report a bounded finding

State version, inputs, settings, times and the observed change. Keep both exports and determine whether the input changed. Do not turn five quiet minutes, fifty candles or two weeks into proof of permanent stability or profitability.

If a tool draws a point backwards, record any decision from its actual recognition time. If that time cannot be established, do not assign trades to historical markers. Information-availability checks and performance after execution costs answer different questions.