Click or drag to resize

CandleHelperToCandles Method (IEnumerableQuoteChangeMessage, MarketDataMessage, Level1Fields, Boolean, CandleBuilderProvider)

To create candles from the order books collection.

Namespace:  StockSharp.Algo.Candles
Assembly:  StockSharp.Algo (in StockSharp.Algo.dll) Version: 4.4.16.0 (4.4.16)
Syntax
C#
public static IEnumerable<CandleMessage> ToCandles(
	this IEnumerable<QuoteChangeMessage> depths,
	MarketDataMessage mdMsg,
	Level1Fields type = Level1Fields.SpreadMiddle,
	bool onlyFormed = true,
	CandleBuilderProvider candleBuilderProvider = null
)

Parameters

depths
Type: System.Collections.GenericIEnumerableQuoteChangeMessage
Market depths.
mdMsg
Type: StockSharp.MessagesMarketDataMessage
Market data subscription.
type (Optional)
Type: StockSharp.MessagesLevel1Fields
Type of candle depth based data.
onlyFormed (Optional)
Type: SystemBoolean
Process only formed candles.
candleBuilderProvider (Optional)
Type: StockSharp.Algo.Candles.CompressionCandleBuilderProvider
Candle builders provider.

Return Value

Type: IEnumerableCandleMessage
Candles.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IEnumerableQuoteChangeMessage. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also