- LogLevel
- SetExpertMagicNumber
- SetDeviationInPoints
- SetTypeFilling
- SetTypeFillingBySymbol
- SetAsyncMode
- SetMarginMode
- OrderOpen
- OrderModify
- OrderDelete
- PositionOpen
- PositionModify
- PositionClose
- PositionClosePartial
- PositionCloseBy
- Buy
- Sell
- BuyLimit
- BuyStop
- SellLimit
- SellStop
- Request
- RequestAction
- RequestActionDescription
- RequestMagic
- RequestOrder
- RequestSymbol
- RequestVolume
- RequestPrice
- RequestStopLimit
- RequestSL
- RequestTP
- RequestDeviation
- RequestType
- RequestTypeDescription
- RequestTypeFilling
- RequestTypeFillingDescription
- RequestTypeTime
- RequestTypeTimeDescription
- RequestExpiration
- RequestComment
- RequestPosition
- RequestPositionBy
- Result
- ResultRetcode
- ResultRetcodeDescription
- ResultDeal
- ResultOrder
- ResultVolume
- ResultPrice
- ResultBid
- ResultAsk
- ResultComment
- CheckResult
- CheckResultRetcode
- CheckResultRetcodeDescription
- CheckResultBalance
- CheckResultEquity
- CheckResultProfit
- CheckResultMargin
- CheckResultMarginFree
- CheckResultMarginLevel
- CheckResultComment
- PrintRequest
- PrintResult
- FormatRequest
- FormatRequestResult
PositionClose
以指定交易品种平仓。
bool PositionClose(
|
关闭指定报价的持仓。
bool PositionClose(
|
参数
交易品种
[输入] 交易工具名称, 即用来平仓的。
报价
[in] 平仓价格。
deviation=ULONG_MAX
[输入] 距现价的最大滑点 (点数为单位)。
返回值
true 结构检查基本成功情况下, 否则 false。
注释
成功完成 PositionClose(...) 方法并不意味着总是成功执行交易操作。有必要检查交易请求的结果 (交易服务器返回码), 使用 ResultRetcode() 获取。