Namespace ATAS.Indicators.Heatmap
Classes
- HeatmapIndicator
Author-facing entry points for the heatmap indicator API. The non-generic
HeatmapIndicatorcoexists with the generic HeatmapIndicator<TSettings> base class — different arities disambiguate them at the type system level.Added in ATAS 8.0.15.
- HeatmapIndicatorAlert
Payload for RaiseAlertAsync(HeatmapIndicatorAlert, CancellationToken). Colors are renderer-neutral hex strings (#AARRGGBB / #RRGGBB) like the rest of the heatmap indicator payloads; null colors fall back to the alert window defaults.
Added in ATAS 8.0.15.
- HeatmapIndicatorAttribute
Marks a class as a heatmap indicator type and supplies discovery metadata. Apply to a concrete class that derives from HeatmapIndicator<TSettings> (or implements IHeatmapIndicator directly).
Added in ATAS 8.0.15.
- HeatmapIndicatorColors
Small colour helpers for heatmap indicator settings and visual overrides. They keep indicator assemblies from duplicating platform-internal colour parsing code.
Added in ATAS 8.0.15.
- HeatmapIndicatorDescriptorBuilder
Fluent builder that produces an immutable HeatmapIndicatorDescriptor alongside the typed visual / series handles required by the state builder. Single-shot: each builder yields exactly one descriptor via Done(); further mutation throws.
Added in ATAS 8.0.15.
- HeatmapIndicatorFallbackReWarmGuard
State holder for indicators whose calculation is anchored at the real data start (e.g. CVD
FromDataStart, VWAPFromDataStart) and may receive a fallback-range warm-up before the host knows the real data start. Encapsulates the latch protocol so the indicator does not have to track three flags and an inline check by hand.Usage:
- Construct once per instance, typically as a readonly field.
- Call Reset() from
ResetAsync. - Call OnWarmedUp(HeatmapIndicatorWarmupRequest) from
WarmUpAsyncwith the incoming request — the guard captures IsFallbackRange and re-arms the latch. - Call ShouldRequestReWarm(HeatmapTickBatch) from
ProcessTicksAsyncafter processing the batch; if it returnstrue, await RequestReWarmAsync(string, CancellationToken).
The guard latches per warm-up cycle: ShouldRequestReWarm(HeatmapTickBatch) returns
trueat most once between two OnWarmedUp(HeatmapIndicatorWarmupRequest) calls, so repeated tick batches do not re-trigger. A fresh warm-up re-arms the latch for the next fallback episode.Threading: per-instance, lock-free. The platform serialises calls on a single indicator instance, which is also the only valid caller of this guard.
Added in ATAS 8.0.15.
- HeatmapIndicatorSeriesHandle<TValue>
Strongly typed handle for a series within a visual. Returned from Series<TValue>(string, HeatmapIndicatorSeriesRole, HeatmapIndicatorValueKind, Func<TValue, decimal>, HeatmapIndicatorVisualStyle?, string?, string?); the constructor is internal so authors cannot fabricate one.
TValueis the indicator-internal sample type — what the indicator's calculation produces. The handle also carries the projection that converts the typed sample to a renderer-facing decimal; the lease applies the projection inline on every Append so the chunked storage holds decimal samples ready for the renderer.Added in ATAS 8.0.15.
- HeatmapIndicatorVisualHandle
Strongly typed handle for a visual added to a descriptor via HeatmapIndicatorDescriptorBuilder. The handle captures the owning descriptor's identity so the state builder can reject handles from a different descriptor at runtime, and the constructor is internal so authors cannot fabricate handles by hand.
Added in ATAS 8.0.15.
- HeatmapIndicator<TSettings>
Strongly typed base for indicator authors. Bridges to the non-generic IHeatmapIndicator with a single explicit cast, so derived classes work against typed settings.
Added in ATAS 8.0.15.
- HeatmapLeaseMisuseException
Thrown when an indicator misuses the visual-state lease API. Distinct from a plain System.InvalidOperationException so call sites can catch lease misuse separately from generic invalid-operation errors, and tests can assert on Reason instead of message text.
Added in ATAS 8.0.15.
- HeatmapMboDataSnapshot
Immutable raw MBO store snapshot shared by all indicator instances. Records are detached from the provider before publication.
Added in ATAS 8.0.15.
- HeatmapWorkingRangeUpdate
Payload for OnHistoricalDataLoadedAsync(HeatmapWorkingRangeUpdate, CancellationToken). The host fired the load; the indicator decides whether to react.
Added in ATAS 8.0.15.
Structs
- HeatmapViewport
A rectangular slice of the heatmap timeline currently visible to the user. Carried by Viewport. PixelWidth is the rendered horizontal extent in physical pixels (DPI-corrected) — useful for choosing decimation step.
Added in ATAS 8.0.15.
Interfaces
- IHeatmapDisposableIndicator
Optional capability: receive a deterministic disposal signal. The supervisor invokes DisposeAsync(CancellationToken) on the instance's own consumer task — serialised against any other in-flight call, observing the per-call timeout — when the instance is removed via
HeatmapIndicatorsController.RemoveInstanceAsyncor when the controller itself is disposed.Added in ATAS 8.0.15.
- IHeatmapHistoricalDataLoadedConsumer
Optional capability: receive a notification when the host's working data range expanded backward (e.g. user panned into history that triggered a load). Implement only if the indicator needs to rebuild or refill calculation state across newly-loaded historical samples. Typical reaction: take a lease,
Clear(), refill from new historical range, dispose lease — the front stays visible across the rebuild.Added in ATAS 8.0.15.
- IHeatmapIndicator
Non-generic runtime contract used by the platform, catalogue, and controller. Indicator authors should derive from HeatmapIndicator<TSettings> instead of implementing this interface directly.
New here? Read
Indicators/Heatmap/README.mdfirst — it contains a five-minute quickstart, the lifecycle reference, the threading contract, and pointers to working reference indicators. The full architecture is documented indocs/Heatmap/HeatmapIndicatorsDesign.md.Added in ATAS 8.0.15.
- IHeatmapIndicatorContext
Live runtime context exposed to a heatmap indicator. Unlike the v1
HeatmapIndicatorContextrecord (snapshot at reset), this is a read-only interface whose properties reflect the host's current state at every read. Indicators query it on demand — there are no "context changed" events because the most volatile field (Viewport) updates every render frame and a cross-thread notification per change would dominate the cost.Stable across the indicator's lifetime: InstrumentId, TickSize, LotSize, TimeZone, TradingSessionId. A change in any of these triggers a platform-initiated reset before the context reports the new value.
Updates as data flows: DataStartTimeNanos moves backward when historical data loads (a separate
OnHistoricalDataLoadedAsyncnotification fires for indicators that need to react), DataEndTimeNanos tracks the latest loaded timestamp (null in live mode = wall-clock now).Updates per frame in live mode: Viewport. Indicators MUST treat the viewport as a hint (e.g. for decimation decisions); it MUST NOT be used for correctness — there is no guarantee the viewport read inside one callback matches the one the renderer drew with.
Added in ATAS 8.0.15.
- IHeatmapIndicatorRuntime
Runtime handle the platform passes to indicators at warm-up / reset time. Lets the indicator drive its own re-warm or full state reset from any of its async methods. The handle is rebound on every reset, so indicators MUST NOT retain a runtime reference across OnStateResetNotificationAsync(IHeatmapIndicatorContext, IHeatmapIndicatorRuntime, CancellationToken) calls.
Added in ATAS 8.0.15.
- IHeatmapMboConsumer
Optional capability for indicators that aggregate Market-By-Order analytics. The platform supplies one shared raw snapshot to every active consumer; each instance applies its own settings and publishes its own visual payload.
Added in ATAS 8.0.15.
- IHeatmapMboDataSource
Shared, ref-counted MBO source exposed by the active heatmap context. Subscribing does not imply one provider subscription per callback: the platform multiplexes all subscriptions over one instrument MBO-core lease.
Added in ATAS 8.0.15.
- IHeatmapMboDataSubscription
Consumer lease returned by Subscribe(Action<HeatmapMboDataSnapshot>). Disposing the last lease lets the platform tear down its MBO-core subscription and heartbeat.
Added in ATAS 8.0.15.
- IHeatmapPanelHeightSettings
Marker contract for heatmap indicator settings DTOs that expose a user-resizable sub-panel height. Implementing this interface opts the indicator into mouse-driven panel resize propagation: when the user drags the sub-panel divider in the renderer the host writes the new value back here, persists the settings, and re-configures the runner, so the height survives the settings round-trip.
Added in ATAS 8.0.15.
- IHeatmapProfileConsumer
Optional capability: receive market-profile snapshots (POC, value area, OHLC) for the profile periods the instance declares in GetRequiredProfilePeriods().
Added in ATAS 8.0.15.
- IHeatmapSeriesLease<TValue>
Per-series mutation surface inside the lease. Append, replace, clear, and trim operations are buffered to the back-stage and become visible to the renderer on lease disposal.
Added in ATAS 8.0.15.
- IHeatmapSeriesStateNode
Read-only handle to a series within an IHeatmapVisualStateNode. The renderer iterates committed samples through this interface; mutation goes through the lease (Series<TValue>(HeatmapIndicatorSeriesHandle<TValue>)).
Added in ATAS 8.0.15.
- IHeatmapTimerConsumer
Optional capability: receive periodic timer ticks. Most indicators do not need this; only opt in if the indicator must do work on a wall clock rather than in response to incoming data — for example, to expire stale state at session boundaries when no trade tick has arrived to wake the indicator up.
Added in ATAS 8.0.15.
- IHeatmapTradeTickConsumer
Optional capability: receive live trades in batches through ProcessTicksAsync(HeatmapTickBatch, CancellationToken). Most heatmap indicators implement it.
Added in ATAS 8.0.15.
- IHeatmapVisualLease
Per-visual mutation surface inside the lease. Style and presentation are mutable properties on the lease; series content is mutated through Series<TValue>(HeatmapIndicatorSeriesHandle<TValue>).
Added in ATAS 8.0.15.
- IHeatmapVisualState
Persistent visual state owned by a single indicator instance and read by the renderer at frame rate. Created by the platform from the indicator's HeatmapIndicatorDescriptor and bound to the indicator via State; the same reference is valid for the entire lifetime of the runner. Resets (instrument switch, explicit
RequestStateResetAsync) clear the content of every series but do NOT replace the state instance.Mutation goes through BeginUpdate(); reads from the renderer are wait-free over the front-committed portion of every series. The detailed contract — including the front/back buffer model, the chunked append-only storage, lease exclusivity, and the version counter — is documented in
docs/Heatmap/HeatmapIndicatorsDesign.md.Added in ATAS 8.0.15.
- IHeatmapVisualStateLease
The exclusive write lease on an IHeatmapVisualState. Acquired via BeginUpdate(); disposing commits the back-stage to the front. A lease can only be used inside the calling stack frame — passing it across
awaitpoints or to background tasks is a misuse pattern (the platform serialises every indicator callback on a single task, so all legitimate writes happen from inside one of those callbacks).Added in ATAS 8.0.15.
- IHeatmapVisualStateNode
Read-only handle to a visual within an IHeatmapVisualState. Carries the descriptor metadata plus the list of series; mutation goes through the lease (Visual(HeatmapIndicatorVisualHandle)).
Added in ATAS 8.0.15.
- IHeatmapWarmupIndicator
Optional capability: build the indicator's history before the live data starts. Implement it when the indicator must show values for the period already loaded in the heatmap, not only from the moment it was added.
Added in ATAS 8.0.15.
Enums
- HeatmapLeaseMisuseReason
Why a HeatmapLeaseMisuseException was thrown. Lets callers distinguish misuse classes without parsing the message text.
Added in ATAS 8.0.15.