Interface IHeatmapIndicator
- Namespace
- ATAS.Indicators.Heatmap
- Assembly
- ATAS.Indicators.dll
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.md first — it contains a
five-minute quickstart, the lifecycle reference, the threading
contract, and pointers to working reference indicators. The full
architecture is documented in docs/Heatmap/HeatmapIndicatorsDesign.md.
Added in ATAS 8.0.15.
public interface IHeatmapIndicator
- Extension Methods
Remarks
Per-instance threading. The platform serialises every call on a single instance — at most one of ConfigureAsync(object, CancellationToken), OnStateResetNotificationAsync(IHeatmapIndicatorContext, IHeatmapIndicatorRuntime, CancellationToken), the warm-up call from WarmUpAsync(HeatmapIndicatorWarmupRequest, IHeatmapIndicatorDataSources, CancellationToken), the consumer calls (ProcessTicksAsync(HeatmapTickBatch, CancellationToken), ProcessProfileAsync(HeatmapMarketProfileSnapshot, CancellationToken), ProcessTimerAsync(HeatmapIndicatorTimerTick, CancellationToken)) is in flight for a given instance. Authors do NOT need to lock for these methods to coordinate against each other. The platform may invoke methods on different instances concurrently, so static state shared between instances still needs the author's protection.
State mutation. Indicators publish their visuals by mutating
State under a lease — see
BeginUpdate(). The renderer reads
State directly at frame rate; the platform never asks the
indicator for a snapshot synchronously.
Cancellation. Each call carries a System.Threading.CancellationToken that fires at the platform's per-call timeout. Implementers MUST honour cancellation — hangs that ignore it are treated as fatal for the instance and cannot be recovered.
Unhandled exceptions. If any lifecycle or capability method
throws an exception that is not System.OperationCanceledException
triggered by the supplied token, the supervisor logs and transitions
the runner to HeatmapIndicatorSnapshotState.Failed; further
callbacks stop being dispatched until the host removes and re-adds
the instance.
Properties
Descriptor
Static type-level metadata. Identifies the indicator type, declares its placement (overlay vs sub-panel), visual roles, and series shape. Must not change between calls.
HeatmapIndicatorDescriptor Descriptor { get; }
Property Value
SettingsType
CLR type of the settings DTO this indicator accepts. Used by the catalogue to materialise persisted settings into the right shape before calling ConfigureAsync(object, CancellationToken).
Type SettingsType { get; }
Property Value
- Type
State
Persistent visual state read by the renderer. Created by the platform from Descriptor at instance construction time; the same reference is returned for the entire instance lifetime. Resets clear content but never replace the reference.
IHeatmapVisualState State { get; }
Property Value
Methods
ConfigureAsync(object, CancellationToken)
Apply user-edited settings. The runtime type of settings must be assignable to SettingsType.
ValueTask ConfigureAsync(object settings, CancellationToken cancellationToken)
Parameters
settingsobjectcancellationTokenCancellationToken
Returns
- ValueTask
OnStateResetNotificationAsync(IHeatmapIndicatorContext, IHeatmapIndicatorRuntime, CancellationToken)
Notify the indicator that the platform has cleared State. Called when the active context changes (instrument, session, time zone) or when the indicator itself called RequestStateResetAsync(string, CancellationToken).
The notification is informational — the front buffer is already blank when this method is invoked. The indicator does NOT mutate state from inside this callback; it simply notes the reset and repopulates state from inside the next data callback (warm-up or process-ticks).
ValueTask OnStateResetNotificationAsync(IHeatmapIndicatorContext context, IHeatmapIndicatorRuntime runtime, CancellationToken cancellationToken)
Parameters
contextIHeatmapIndicatorContextruntimeIHeatmapIndicatorRuntimecancellationTokenCancellationToken
Returns
- ValueTask