Click or drag to resize

StrategyHelperClosePosition Method

To close open position by market (to register the order of the type Market).

Namespace:  StockSharp.Algo.Strategies
Assembly:  StockSharp.Algo (in StockSharp.Algo.dll) Version: (4.4.16)
public static void ClosePosition(
	this Strategy strategy,
	[OptionalAttribute] decimal slippage


Type: StockSharp.Algo.StrategiesStrategy
slippage (Optional)
Type: SystemDecimal
The slippage level, admissible at the order registration. It is used, if the order is registered using the limit order.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Strategy. 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).
The market order is not operable on all exchanges.
See Also