BotclosePosition Method
Closes the position specified
Namespace: SharpTraderBotAssembly: SharpTraderBot (in SharpTraderBot.dll) Version: 1.0.0
public string closePosition(
STPosition position,
double price = 0,
int slippage = 0,
OrderType oType = OrderType.MARKET
)
Public Function closePosition (
position As STPosition,
Optional price As Double = 0,
Optional slippage As Integer = 0,
Optional oType As OrderType = OrderType.MARKET
) As String
public:
String^ closePosition(
STPosition^ position,
double price = 0,
int slippage = 0,
OrderType oType = OrderType::MARKET
)
member closePosition :
position : STPosition *
?price : float *
?slippage : int *
?oType : OrderType
(* Defaults:
let _price = defaultArg price 0
let _slippage = defaultArg slippage 0
let _oType = defaultArg oType OrderType.MARKET
*)
-> string
- 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
StringUnique client identificator for the order