Struct IndicatorValue
- Namespace
- MassiveDotNet.Rest.Models
- Assembly
- MassiveDotNet.Rest.dll
One point of a technical indicator series: the value, and the timestamp of the last aggregate that produced it.
[JsonConverter(typeof(IndicatorValueJsonConverter))]
public readonly record struct IndicatorValue : IEquatable<IndicatorValue>
- Implements
- Inherited Members
Remarks
A struct, like Agg (decision D4): a series is read as a whole and nobody null-checks a point. Timestamp is computed from TimestampMilliseconds only when read (decision D5).
Properties
Timestamp
The moment of the last aggregate used to compute this value, converted from TimestampMilliseconds.
[JsonIgnore]
public Instant Timestamp { get; }
Property Value
Remarks
The raw long is what gets deserialized and stored; this conversion happens only when read, so a long series costs nothing until the value is actually wanted.
TimestampMilliseconds
The Unix millisecond timestamp of the last aggregate used in this calculation.
[JsonPropertyName("timestamp")]
public long TimestampMilliseconds { get; init; }
Property Value
Value
The indicator's value at this point.
[JsonPropertyName("value")]
public double Value { get; init; }