Click or drag to resize

TraderHelperGetCandles Method

To download candles.

Namespace:  StockSharp.Algo
Assembly:  StockSharp.Algo (in StockSharp.Algo.dll) Version: 4.4.17.0 (4.4.17)
Syntax
C#
public static IEnumerable<TimeFrameCandleMessage> GetCandles(
	this IMessageAdapter adapter,
	SecurityId securityId,
	TimeSpan timeFrame,
	DateTimeOffset from,
	DateTimeOffset to,
	Nullable<long> count = null,
	Nullable<Level1Fields> buildField = null
)

Parameters

adapter
Type: StockSharp.MessagesIMessageAdapter
Adapter.
securityId
Type: StockSharp.MessagesSecurityId
Security ID.
timeFrame
Type: SystemTimeSpan
Time-frame.
from
Type: SystemDateTimeOffset
Begin period.
to
Type: SystemDateTimeOffset
End period.
count (Optional)
Type: SystemNullableInt64
Candles count.
buildField (Optional)
Type: SystemNullableLevel1Fields
Extra info for the BuildFrom.

Return Value

Type: IEnumerableTimeFrameCandleMessage
Downloaded candles.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IMessageAdapter. 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