Click or drag to resize

CandleHelperToCandles Method (IEnumerableQuoteChangeMessage, CandleSeries, 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)
public static IEnumerable<CandleMessage> ToCandles(
	this IEnumerable<QuoteChangeMessage> depths,
	CandleSeries series,
	Level1Fields type = Level1Fields.SpreadMiddle,
	bool onlyFormed = true,
	CandleBuilderProvider candleBuilderProvider = null


Type: System.Collections.GenericIEnumerableQuoteChangeMessage
Market depths.
Type: StockSharp.Algo.CandlesCandleSeries
Candles series.
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

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