Table of Contents

Class TimeFrameCandleBuilder

Namespace
StockSharp.Algo.Candles.Compression
Assembly
StockSharp.Algo.dll

The builder of candles of TimeFrameCandleMessage type.

public class TimeFrameCandleBuilder : CandleBuilder<TimeFrameCandleMessage>, IPersistable, ILogReceiver, ILogSource, ICandleBuilder, IDisposable
Inheritance
TimeFrameCandleBuilder
Implements
IPersistable
Inherited Members
Extension Methods

Constructors

TimeFrameCandleBuilder(IExchangeInfoProvider)

Initializes a new instance of the TimeFrameCandleBuilder.

public TimeFrameCandleBuilder(IExchangeInfoProvider exchangeInfoProvider)

Parameters

exchangeInfoProvider IExchangeInfoProvider

The exchange boards provider.

Properties

GenerateEmptyCandles

Whether to create empty candles (None) in the lack of trades. The default mode is enabled.

public bool GenerateEmptyCandles { get; set; }

Property Value

bool

Timeout

The time shift from the time frame end after which a signal is sent to close the unclosed candle forcibly. The default is 10% of the time frame.

public Unit Timeout { get; set; }

Property Value

Unit

Methods

CreateCandle(ICandleBuilderSubscription, ICandleBuilderValueTransform)

To create a new candle.

protected override TimeFrameCandleMessage CreateCandle(ICandleBuilderSubscription subscription, ICandleBuilderValueTransform transform)

Parameters

subscription ICandleBuilderSubscription

Subscription.

transform ICandleBuilderValueTransform

The data source transformation.

Returns

TimeFrameCandleMessage

Created candle.

IsCandleFinishedBeforeChange(ICandleBuilderSubscription, TimeFrameCandleMessage, ICandleBuilderValueTransform)

Whether the candle is created before data adding.

protected override bool IsCandleFinishedBeforeChange(ICandleBuilderSubscription subscription, TimeFrameCandleMessage candle, ICandleBuilderValueTransform transform)

Parameters

subscription ICandleBuilderSubscription

Subscription.

candle TimeFrameCandleMessage

Candle.

transform ICandleBuilderValueTransform

The data source transformation.

Returns

bool

true if the candle should be finished. Otherwise, false.