CandleExpressionCondition
StockSharp.Algo.Candles.Patterns
Formel für eine einzelne Kerze im inneren Muster.
Implementiert: IAsyncPersistable
Konstruktoren
CandleExpressionCondition
public CandleExpressionCondition(IFileSystem fileSystem, string expression)
candleExpressionCondition = CandleExpressionCondition(fileSystem, expression)
Erstellen Sie Instanz.
- fileSystem
- Dateisystem.
- expression
- Ausdruck
Eigenschaften
Expression
public string Expression { get; private set; }
value = candleExpressionCondition.Expression
candleExpressionCondition.Expression = value
Ausdruck.
IsEmpty
public bool IsEmpty { get; }
value = candleExpressionCondition.IsEmpty
Formel ist nicht vorhanden.
Methoden
CheckCondition
public bool CheckCondition(ReadOnlySpan<ICandleMessage> candles, int candleIndex)
result = candleExpressionCondition.CheckCondition(candles, candleIndex)
Überprüfen Sie, ob die Bedingung für die angegebenen Kerzen erfüllt ist.
- candles
- Die Kerzen, um den Zustand zu überprüfen.
- candleIndex
- Der Index der Kerze in der Kerzen-Array.
Rückgabe: Prüfergebnis.
LoadAsync
public Task LoadAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = candleExpressionCondition.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.
Rückgabe: A task that represents the asynchronous load operation.
PrepareAsync
public ValueTask PrepareAsync(CancellationToken cancellationToken)
result = candleExpressionCondition.PrepareAsync(cancellationToken)
Compile Expression, so that the condition can be evaluated. Repeated calls do nothing.
- cancellationToken
- CancellationToken
Rückgabe: ValueTask
SaveAsync
public Task SaveAsync(SettingsStorage storage, CancellationToken cancellationToken)
result = candleExpressionCondition.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.
Rückgabe: A task that represents the asynchronous save operation.
ToString
public override string ToString()
result = candleExpressionCondition.ToString()
Konvertieren Sie in eine Liniendarstellung.
Rückgabe: String-Leistung.
Felder
Variables
public static readonly Variable[] Variables
value = CandleExpressionCondition.Variables
Candle Formelvariablen.