CandleExpressionCondition
StockSharp.Algo.Candles.Patterns
单个蜡烛的公式 内在图案。
构造函数
CandleExpressionCondition
public CandleExpressionCondition(IFileSystem fileSystem, string expression)
candleExpressionCondition = CandleExpressionCondition(fileSystem, expression)
创建实例 。
- fileSystem
- 文件系统。
- expression
- 表达式
属性
Expression
public string Expression { get; private set; }
value = candleExpressionCondition.Expression
candleExpressionCondition.Expression = value
表达相.
方法
CheckCondition
public bool CheckCondition(ReadOnlySpan<ICandleMessage> candles, int candleIndex)
result = candleExpressionCondition.CheckCondition(candles, candleIndex)
检查是否满足了给定的蜡烛的条件 。
- candles
- 蜡烛来检查状况
- candleIndex
- 蜡烛阵列中的蜡烛索引.
返回值: 检查结果。
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.
返回值: 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
返回值: 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.
返回值: A task that represents the asynchronous save operation.
ToString
public override string ToString()
result = candleExpressionCondition.ToString()
转换为行代表.
返回值: 弦乐表演.
字段
Variables
public static readonly Variable[] Variables
value = CandleExpressionCondition.Variables
烛花公式变量.