- 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(
|
매개변수
Symbol
[in] 포지션을 닫을 거래 상품 이름.
티켓
[in] 닫힌 포지션 티켓.
deviation=ULONG_MAX
[in] 현재 가격과의 최대 편차(점 단위).
값 반환
기본 구조를 성공적으로 확인하면 true, 그렇지 않으면 false.
참고
PositionClose(...) 메서드가 성공적으로 완료되었다고 해서 항상 거래 작업이 성공적으로 실행되는 것은 아닙니다. ResultRetcode()를 사용하여 거래 결과(거래 서버 반환코드)를 확인해야 합니다.
포지션의 (ACCOUNT_MARGIN_MODE_RETAIL_NETTING 및 ACCOUNT_MARGIN_MODE_EXCHANGE) "netting" 해석의 경우, 하나의 포지션만이 Symbol에 대해서 존재할 수 있습니다. 이 포지션은 하나 이상의 딜 결과입니다. 도구 상자 창의 거래 탭에도 표시되는 유효한 지정가 주문의 포지션을 혼동하지 마십시오.
개별 포지션이 허용되는 경우 (ACCOUNT_MARGIN_MODE_RETAIL_HEDGING),기호 하나에 대해 여러 포지션을 열 수 있습니다. 이 경우, PositionClose가 가장 낮은 티켓으로 포지션을 닫습니다.