Click or drag to resize

TraderHelperCancelOrders Method

Cancel orders by filter.

Namespace:  StockSharp.Algo
Assembly:  StockSharp.Algo (in StockSharp.Algo.dll) Version: 4.4.16.0 (4.4.16)
Syntax
C#
public static void CancelOrders(
	this IConnector connector,
	IEnumerable<Order> orders,
	Nullable<bool> isStopOrder = null,
	Portfolio portfolio = null,
	Nullable<Sides> direction = null,
	ExchangeBoard board = null,
	Security security = null,
	Nullable<SecurityTypes> securityType = null
)

Parameters

connector
Type: StockSharp.BusinessEntitiesIConnector
The connection of interaction with trade systems.
orders
Type: System.Collections.GenericIEnumerableOrder
The group of orders, from which the required orders shall be found and cancelled.
isStopOrder (Optional)
Type: SystemNullableBoolean
, if cancel only a stop orders, - if regular orders, - both.
portfolio (Optional)
Type: StockSharp.BusinessEntitiesPortfolio
Portfolio. If the value is equal to , then the portfolio does not match the orders cancel filter.
direction (Optional)
Type: SystemNullableSides
Order side. If the value is , the direction does not use.
board (Optional)
Type: StockSharp.BusinessEntitiesExchangeBoard
Trading board. If the value is equal to , then the board does not match the orders cancel filter.
security (Optional)
Type: StockSharp.BusinessEntitiesSecurity
Instrument. If the value is equal to , then the instrument does not match the orders cancel filter.
securityType (Optional)
Type: SystemNullableSecurityTypes
Security type. If the value is , the type does not use.

Usage Note

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