Table of Contents

Interface IHeatmapProfileConsumer

Namespace
ATAS.Indicators.Heatmap
Assembly
ATAS.Indicators.dll

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.

public interface IHeatmapProfileConsumer
Extension Methods

Methods

GetRequiredProfilePeriods()

The market-profile periods this instance actually consumes. The platform's profile pump unions the declared periods across all active consumers and only subscribes to / requests those, instead of every available HeatmapProfilePeriod. Each extra period the host pumps is a separate server-side profile subscription kept live tick-by-tick, so declaring a narrow set avoids that cost for periods the indicator never reads. Returning an empty set means the instance needs no profile data right now (e.g. every profile-driven level is disabled), and the host pumps nothing for it.

Declaring the needed periods is mandatory for every profile consumer: there is no "all periods" fallback, precisely so a consumer can never silently pull data it does not use.

Threading. Unlike ProcessProfileAsync(HeatmapMarketProfileSnapshot, CancellationToken) and the other serialised lifecycle callbacks, this method may be invoked from the host's pump thread at any time, concurrently with the instance's own consumer task. Implementations MUST be thread-safe, cheap, and non-blocking: return an immutable snapshot derived from already-published state (e.g. a volatile field refreshed inside ConfigureAsync(TSettings, CancellationToken)), and never mutate indicator state from here.

IReadOnlyCollection<HeatmapProfilePeriod> GetRequiredProfilePeriods()

Returns

IReadOnlyCollection<HeatmapProfilePeriod>

ProcessProfileAsync(HeatmapMarketProfileSnapshot, CancellationToken)

Processes one market-profile snapshot. The platform polls the profiles of the declared periods periodically and calls this method on the instance's own task, serialised with the other callbacks, once per snapshot; only snapshots of periods returned by GetRequiredProfilePeriods() are delivered.

ValueTask ProcessProfileAsync(HeatmapMarketProfileSnapshot profile, CancellationToken cancellationToken)

Parameters

profile HeatmapMarketProfileSnapshot

The profile snapshot; its period is one of the declared periods.

cancellationToken CancellationToken

Cancelled when the per-call timeout expires or the instance is shut down.

Returns

ValueTask

A task that completes when the snapshot has been processed.