Table of Contents

Struct MacdValue

Namespace
MassiveDotNet.Rest.Models
Assembly
MassiveDotNet.Rest.dll

One point of a MACD series: the MACD line, its signal line, the histogram between them, and the timestamp of the last aggregate that produced them.

[JsonConverter(typeof(MacdValueJsonConverter))]
public readonly record struct MacdValue : IEquatable<MacdValue>
Implements
Inherited Members

Remarks

A struct, like IndicatorValue (decision D4). Timestamp is computed from TimestampMilliseconds only when read (decision D5).

Properties

Histogram

The MACD line minus the signal line.

[JsonPropertyName("histogram")]
public double Histogram { get; init; }

Property Value

double

Signal

The signal line: an exponential moving average of the MACD line over the signal window.

[JsonPropertyName("signal")]
public double Signal { get; init; }

Property Value

double

Timestamp

The moment of the last aggregate used to compute this point, converted from TimestampMilliseconds.

[JsonIgnore]
public Instant Timestamp { get; }

Property Value

Instant

Remarks

The conversion happens only when read (decision D5).

TimestampMilliseconds

The Unix millisecond timestamp of the last aggregate used in this calculation.

[JsonPropertyName("timestamp")]
public long TimestampMilliseconds { get; init; }

Property Value

long

Value

The MACD line: the short exponential moving average minus the long one.

[JsonPropertyName("value")]
public double Value { get; init; }

Property Value

double