Live data
Handle incoming observations without assuming historical replay timing or candle completion.
A live session receives incoming data through its configured adapter. Delivery timing, update granularity, and available fields can differ from a historical dataset for the same instrument.
Expect updates, not just new timestamps
Several observations may describe the same timestamp while prices or other fields change. Decide whether your strategy processes every update, the first observation at each timestamp, or a verified completed-bar signal.
The getting-started probe distinguishes repeated timestamps from older observations. It deliberately does not deduplicate by price or infer whether a candle has closed.
Keep market time and arrival time separate
Use the observation's market timestamp to explain the signal. If you also measure delivery delay, record that separately and account for the source's timestamp convention. A candle timestamp can refer to its opening boundary; comparing it directly with wall-clock time is not automatically a latency measurement.
During historical replay, a wall-clock freshness threshold would classify historical bars as stale even when they are valid inputs. Keep live delivery checks separate from replay sampling rules.
Check derived evidence
A cached algorithm output can exist before it is ready or after its source observation is no longer appropriate for the current decision. Use the producer's documented readiness and timestamp fields.
Native Pine executes after SJS in the shared frame runner. SJS should not assume that reading Pine output yields calculations from the same invocation. See execution flow and the Pine-to-SJS tutorial.
Reconnect deliberately
Do not assume a reconnect delivers every missed observation or reconstructs arbitrary strategy state. Inspect the adapter's returned data and the strategy's readiness before resuming decisions. Use a gap policy appropriate to your strategy, such as clearing a short local sample window and warming it again.
This is separate from reconnecting the Lab browser to a historical job: restoring the Lab UI does not turn a replay into a live market stream.
Compare initial history, data granularity, sampling, session rules, and execution environment when investigating a live-versus-historical difference. Continue with sessions and timezones.