• Give a chart a data context whose variant counts as part of its source.

    Chart.setDataContext treats a change of symbol, exchange, interval or variant as a new source: it aborts requested bars, restarts source revisions and tells studies to read the context again. For a Chart this is therefore setDataContext with the variant normalized, and data:context fires once.

    A target that does not compare the variant, such as a host's own DataContextTarget, would ignore a context that differs only there and go on reporting the old one. For it this passes through a context with a different interval first, which the target does treat as a source change, then sets the real one. The instrument never changes on the way, so event markers, linked drawings and news stay with it. On that detour data:context fires twice: once for the passing context, whose interval is cleared, then for the real one. That context is marked, and the library's requested studies, Tier 2 studies and alert controller wait for the real one rather than fetch, report or save for it. A host's own listener sees both.

    Parameters

    Returns void