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
IExchangeInfoProviderThe 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
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
Methods
CreateCandle(ICandleBuilderSubscription, ICandleBuilderValueTransform)
To create a new candle.
protected override TimeFrameCandleMessage CreateCandle(ICandleBuilderSubscription subscription, ICandleBuilderValueTransform transform)
Parameters
subscription
ICandleBuilderSubscriptionSubscription.
transform
ICandleBuilderValueTransformThe 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
ICandleBuilderSubscriptionSubscription.
candle
TimeFrameCandleMessageCandle.
transform
ICandleBuilderValueTransformThe data source transformation.