BotclosePositionByIndex Method

Closes the position with index specified

Definition

Namespace: SharpTraderBot
Assembly: SharpTraderBot (in SharpTraderBot.dll) Version: 1.0.0
C#
public string closePositionByIndex(
	int index,
	double Price = 0,
	int slippage = 0,
	OrderType oType = OrderType.MARKET
)

Parameters

index  Int32
Index of the position to be closed
Price  Double  (Optional)

[Missing <param name="Price"/> documentation for "M:SharpTraderBot.Bot.closePositionByIndex(System.Int32,System.Double,System.Int32,SharpTraderBot.OrderType)"]

slippage  Int32  (Optional)
Maximum slippage allowed
oType  OrderType  (Optional)
Type of the order used for closure

Return Value

String
Unique client identificator for the order

See Also