BotclosePosition Method

Closes the position specified

Definition

Namespace: SharpTraderBot
Assembly: SharpTraderBot (in SharpTraderBot.dll) Version: 1.0.0
C#
public string closePosition(
	STPosition position,
	double price = 0,
	int slippage = 0,
	OrderType oType = OrderType.MARKET
)

Parameters

position  STPosition
Position to be closed
price  Double  (Optional)
Price at which position shoul be closed
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