Click or drag to resize

CandleHelperToCandles Method (IEnumerableExecutionMessage, MarketDataMessage, Boolean, CandleBuilderProvider)

To create candles from the tick trades 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<ExecutionMessage> executions,
	MarketDataMessage mdMsg,
	bool onlyFormed = true,
	CandleBuilderProvider candleBuilderProvider = null
)

Parameters

executions
Type: System.Collections.GenericIEnumerableExecutionMessage
Tick data.
mdMsg
Type: StockSharp.MessagesMarketDataMessage
Market data subscription.
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 IEnumerableExecutionMessage. 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