Class HeatmapIndicatorDescriptorBuilder
- Namespace
- ATAS.Indicators.Heatmap
- Assembly
- ATAS.Indicators.dll
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.
public sealed class HeatmapIndicatorDescriptorBuilder
- Inheritance
-
objectHeatmapIndicatorDescriptorBuilder
- Extension Methods
Examples
private static readonly HeatmapIndicatorDescriptor _descriptor;
private static readonly HeatmapIndicatorVisualHandle _panel;
private static readonly HeatmapIndicatorSeriesHandle<long> _value;
static MyIndicator()
{
var build = HeatmapIndicator.Describe("vendor.my-indicator", "My Indicator");
_panel = build.SubPanelScalar("my.panel", "My Panel");
_value = _panel.Series<long>(
"my.value",
HeatmapIndicatorSeriesRole.Scalar,
HeatmapIndicatorValueKind.Integer,
metricId: "my.value");
_descriptor = build.Done();
}
Methods
Done()
Seal the builder and produce the immutable descriptor. The visual / series handles minted by this builder remain usable as state-builder inputs after Done(); what becomes invalid is mutation (no more Visual(string, HeatmapIndicatorVisualKind, string?, HeatmapIndicatorVisualStyle?, HeatmapIndicatorVisualPresentation?, string?) calls, no more Series<TValue>(string, HeatmapIndicatorSeriesRole, HeatmapIndicatorValueKind, Func<TValue, decimal>, HeatmapIndicatorVisualStyle?, string?, string?) calls). Single-shot: a second Done() throws.
public HeatmapIndicatorDescriptor Done()
Returns
Histogram(string, string?, HeatmapIndicatorVisualStyle?, HeatmapIndicatorVisualPresentation?)
Adds a visual of kind Histogram.
public HeatmapIndicatorVisualHandle Histogram(string visualId, string? label = null, HeatmapIndicatorVisualStyle? defaultStyle = null, HeatmapIndicatorVisualPresentation? defaultPresentation = null)
Parameters
visualIdstringIdentifier of the visual, unique within this descriptor.
labelstringOptional display label of the visual.
defaultStyleHeatmapIndicatorVisualStyleOptional default style of the visual.
defaultPresentationHeatmapIndicatorVisualPresentationOptional renderer hints for the visual; null leaves the renderer defaults.
Returns
- HeatmapIndicatorVisualHandle
The handle used to declare the series of the visual and to update it under a lease.
Remarks
The built-in heatmap renderer has no drawing for this kind: a histogram visual is drawn only by the custom
renderer named in the rendererId argument of Visual(string, HeatmapIndicatorVisualKind, string?, HeatmapIndicatorVisualStyle?, HeatmapIndicatorVisualPresentation?, string?). Added through this method, without
a renderer, the visual keeps its series but is not drawn.
Exceptions
- ArgumentException
visualIdis null or empty.- InvalidOperationException
A visual with the same
visualIdwas already added, or Done() was already called.
LevelLine(string, string?, HeatmapIndicatorVisualStyle?)
public HeatmapIndicatorVisualHandle LevelLine(string visualId, string? label = null, HeatmapIndicatorVisualStyle? defaultStyle = null)
Parameters
visualIdstringIdentifier of the visual, unique within this descriptor.
labelstringOptional display label of the visual.
defaultStyleHeatmapIndicatorVisualStyleOptional default style of the visual.
Returns
- HeatmapIndicatorVisualHandle
The handle used to declare the series of the visual and to update it under a lease.
Exceptions
- ArgumentException
visualIdis null or empty.- InvalidOperationException
A visual with the same
visualIdwas already added, or Done() was already called.
PriceLine(string, string?, HeatmapIndicatorVisualStyle?)
public HeatmapIndicatorVisualHandle PriceLine(string visualId, string? label = null, HeatmapIndicatorVisualStyle? defaultStyle = null)
Parameters
visualIdstringIdentifier of the visual, unique within this descriptor.
labelstringOptional display label of the visual.
defaultStyleHeatmapIndicatorVisualStyleOptional default style of the visual.
Returns
- HeatmapIndicatorVisualHandle
The handle used to declare the series of the visual and to update it under a lease.
Exceptions
- ArgumentException
visualIdis null or empty.- InvalidOperationException
A visual with the same
visualIdwas already added, or Done() was already called.
SubPanelPair(string, string?, HeatmapIndicatorVisualStyle?, HeatmapIndicatorVisualPresentation?)
Adds a SubPanelPair visual: a sub-panel below the heatmap that plots a pair of series, Buy and Sell, over time.
public HeatmapIndicatorVisualHandle SubPanelPair(string visualId, string? label = null, HeatmapIndicatorVisualStyle? defaultStyle = null, HeatmapIndicatorVisualPresentation? defaultPresentation = null)
Parameters
visualIdstringIdentifier of the visual, unique within this descriptor.
labelstringOptional display label of the visual.
defaultStyleHeatmapIndicatorVisualStyleOptional default style of the visual.
defaultPresentationHeatmapIndicatorVisualPresentationOptional renderer hints for the sub-panel (height, render mode, scale); null leaves the renderer defaults.
Returns
- HeatmapIndicatorVisualHandle
The handle used to declare the series of the visual and to update it under a lease.
Exceptions
- ArgumentException
visualIdis null or empty.- InvalidOperationException
A visual with the same
visualIdwas already added, or Done() was already called.
SubPanelScalar(string, string?, HeatmapIndicatorVisualStyle?, HeatmapIndicatorVisualPresentation?)
Adds a SubPanelScalar visual: a sub-panel below the heatmap that plots its Scalar series over time.
public HeatmapIndicatorVisualHandle SubPanelScalar(string visualId, string? label = null, HeatmapIndicatorVisualStyle? defaultStyle = null, HeatmapIndicatorVisualPresentation? defaultPresentation = null)
Parameters
visualIdstringIdentifier of the visual, unique within this descriptor.
labelstringOptional display label of the visual.
defaultStyleHeatmapIndicatorVisualStyleOptional default style of the visual.
defaultPresentationHeatmapIndicatorVisualPresentationOptional renderer hints for the sub-panel (height, render mode, scale); null leaves the renderer defaults.
Returns
- HeatmapIndicatorVisualHandle
The handle used to declare the series of the visual and to update it under a lease.
Exceptions
- ArgumentException
visualIdis null or empty.- InvalidOperationException
A visual with the same
visualIdwas already added, or Done() was already called.
ValueArea(string, string?, HeatmapIndicatorVisualStyle?)
Adds a ValueArea visual drawn over the heatmap from its Poc series and, when both are declared, its ValueAreaHigh and ValueAreaLow series.
public HeatmapIndicatorVisualHandle ValueArea(string visualId, string? label = null, HeatmapIndicatorVisualStyle? defaultStyle = null)
Parameters
visualIdstringIdentifier of the visual, unique within this descriptor.
labelstringOptional display label of the visual.
defaultStyleHeatmapIndicatorVisualStyleOptional default style of the visual.
Returns
- HeatmapIndicatorVisualHandle
The handle used to declare the series of the visual and to update it under a lease.
Exceptions
- ArgumentException
visualIdis null or empty.- InvalidOperationException
A visual with the same
visualIdwas already added, or Done() was already called.
Visual(string, HeatmapIndicatorVisualKind, string?, HeatmapIndicatorVisualStyle?, HeatmapIndicatorVisualPresentation?, string?)
Add a visual of any kind. The kind-specific helpers (PriceLine(string, string?, HeatmapIndicatorVisualStyle?), SubPanelScalar(string, string?, HeatmapIndicatorVisualStyle?, HeatmapIndicatorVisualPresentation?), …) are usually clearer; reach for this one when the kind is computed at runtime.
public HeatmapIndicatorVisualHandle Visual(string visualId, HeatmapIndicatorVisualKind kind, string? label = null, HeatmapIndicatorVisualStyle? defaultStyle = null, HeatmapIndicatorVisualPresentation? defaultPresentation = null, string? rendererId = null)
Parameters
visualIdstringkindHeatmapIndicatorVisualKindlabelstringdefaultStyleHeatmapIndicatorVisualStyledefaultPresentationHeatmapIndicatorVisualPresentationrendererIdstring