Click or drag to resize

TraderHelperAddOrSubtractTradingDays Method

To get date of day T +/- of N trading days.

Namespace:  StockSharp.Algo
Assembly:  StockSharp.Algo (in StockSharp.Algo.dll) Version: (4.4.16)
public static DateTimeOffset AddOrSubtractTradingDays(
	this ExchangeBoard board,
	DateTimeOffset date,
	int n,
	bool checkHolidays = true


Type: StockSharp.BusinessEntitiesExchangeBoard
Board info.
Type: SystemDateTimeOffset
The start T date, to which are added or subtracted N trading days.
Type: SystemInt32
The N size. The number of trading days for the addition or subtraction.
checkHolidays (Optional)
Type: SystemBoolean
Whether to check the passed date for a weekday (Saturday and Sunday are days off, returned value for them is ).

Return Value

Type: DateTimeOffset
The end T +/- N date.

Usage Note

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