CandleExpressionCondition

StockSharp.Algo.Candles.Patterns

Formula for a single candle inside pattern.

Implements: IPersistable

Constructors

CandleExpressionCondition
public CandleExpressionCondition(IFileSystem fileSystem, string expression)
candleExpressionCondition = CandleExpressionCondition(fileSystem, expression)

Create instance.

fileSystem
File system.
expression
Expression

Properties

Expression
public string Expression { get; private set; }
value = candleExpressionCondition.Expression
candleExpressionCondition.Expression = value

Expression.

IsEmpty
public bool IsEmpty { get; }
value = candleExpressionCondition.IsEmpty

Formula is not present.

Methods

CheckCondition
public bool CheckCondition(ReadOnlySpan<ICandleMessage> candles, int candleIndex)
result = candleExpressionCondition.CheckCondition(candles, candleIndex)

Check if the condition is met for the given candles.

candles
The candles to check the condition against.
candleIndex
The index of the candle in the candles array.

Returns: Check result.

Load
public void Load(SettingsStorage storage)
candleExpressionCondition.Load(storage)

Loads the state of the object from the specified SettingsStorage.

storage
The SettingsStorage instance from which to load the data.
Save
public void Save(SettingsStorage storage)
candleExpressionCondition.Save(storage)

Saves the state of the object to the specified SettingsStorage.

storage
The SettingsStorage instance to which to save the data.
ToString
public override string ToString()
result = candleExpressionCondition.ToString()

Returns a string representation of the tuple, with values separated by commas.

Returns: A string representing the tuple's values.

Fields

Variables
public static readonly Variable[] Variables
value = CandleExpressionCondition.Variables

Candle formula variables.