IndicatorSpec
Which indicator to run, with what parameters, on which candle series.
Herda de: Equatable<IndicatorSpec>
Implementa: IAsyncPersistable
Construtores
public IndicatorSpec()
indicatorSpec = IndicatorSpec()
Initializes a new instance of the IndicatorSpec. For deserialization; use Object}}) to build one.
Propriedades
public DataType CandleType { get; private set; }
value = indicatorSpec.CandleType
indicatorSpec.CandleType = value
Candle series the indicator runs on. Part of what the specification names: the same indicator on a different series is a different computation.
public string Kind { get; private set; }
value = indicatorSpec.Kind
indicatorSpec.Kind = value
Indicator type name, matched case-insensitively.
public IReadOnlyDictionary<string, object> Parameters { get; private set; }
value = indicatorSpec.Parameters
indicatorSpec.Parameters = value
Tuning parameters keyed by the indicator's property names, matched case-insensitively.
Métodos
public override IndicatorSpec Clone()
result = indicatorSpec.Clone()
Creates a new object that is a copy of the current instance.
Retorna: A new object that is a copy of this instance.
public static IndicatorSpec Create(string kind, DataType candleType, IEnumerable<KeyValuePair<string, object>> parameters)
result = IndicatorSpec.Create(kind, candleType, parameters)
Builds a specification.
- kind
- Indicator type name, matched case-insensitively. Either the full name, such as BollingerBands, or a short alias the indicator declares, such as BB.
- candleType
- Candle series the indicator runs on.
- parameters
- Tuning parameters keyed by the indicator's property names, matched case-insensitively. Omitted properties keep the indicator's defaults.
Retorna: The specification.
public override int GetHashCode()
result = indicatorSpec.GetHashCode()
Serves as the default hash function.
Retorna: A hash code for the current object.
public Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = indicatorSpec.LoadAsync(storage, cancellationToken)
Asynchronously loads the state of the object from the specified SettingsStorage.
- storage
- The SettingsStorage instance from which to load the data.
- cancellationToken
- A token to monitor for cancellation requests.
Retorna: A task that represents the asynchronous load operation.
protected override bool OnEquals(IndicatorSpec other)
result = indicatorSpec.OnEquals(other)
public Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = indicatorSpec.SaveAsync(storage, cancellationToken)
Asynchronously saves the state of the object to the specified SettingsStorage.
- storage
- The SettingsStorage instance to which to save the data.
- cancellationToken
- A token to monitor for cancellation requests.
Retorna: A task that represents the asynchronous save operation.
public override string ToString()
result = indicatorSpec.ToString()
Returns a string representation of the tuple, with values separated by commas.
Retorna: A string representing the tuple's values.