- 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
PositionClosePartial
Hedge'li hesaplama durumunda belirtilen sembol üzerindeki bir açık pozisyonu kısmen kapatır.
bool PositionClosePartial(
|
Hedge'li hesaplama durumunda belirtilen fiş değerine sahip açık pozisyonu kısmen kapatır.
bool PositionClosePartial(
|
Parametreler
symbol
[in] Kısmen kapatılan pozisyonun sembolünün ismi. Eğer pozisyonun kısmen kapatılması için sembol belirtilmişse (fiş değil), bu sembol üzerinde belirtilen SihirliSayıya (MagicNumber – Expert Advisor ID) sahip ilk pozisyon seçilir. Bu yüzden, PositionClosePartial() yöntemini fiş numarası ile kullanmak bazen daha iyidir.
volume
[in] Pozisyondaki, kapatılacak hacim miktarı. Bu değerin pozisyon hacmini geçmesi durumunda pozisyon tamamen kapatılır. Ters yönde pozisyon açılmaz.
ticket
[in] kapatılacak pozisyonun fişi.
deviation=ULONG_MAX
[in] Mevcut fiyattan maksimum sapma (puan bazında).
Dönüş Değeri
Yapıların temel denetimi başarılı ise 'true', aksi durumda 'false'.
Not
PositionClosePartial(...) yönteminin başarıyla sonuçlanması her zaman başarılı bir alım-satım işlemi uygulandığı anlamına gelmez. Bu yüzden, alım-satım isteğinin sonucunun (işlem sunucusunun dönüş kodu) ResultRetcode() yöntemi kullanılarak denetlenmesi önemlidir.
"Netleştirme" sisteminde (ACCOUNT_MARGIN_MODE_RETAIL_NETTING ve ACCOUNT_MARGIN_MODE_EXCHANGE), herhangi bir anda herhangi bir sembol için sadece bir pozisyon açık olabilir (bu pozisyon birkaç işlemin sonucu olabilir). Mevcut bekleyen emirleri Terminalin "AraçKutusu" panelindeki "İşlem" sekmesinde gösterilen pozisyonlarla karıştırmayın.
Pozisyon temsili durumunda (ACCOUNT_MARGIN_MODE_RETAIL_HEDGING), her bir sembol için aynı anda birkaç pozisyon açık olabilir. Bu durumda, PositionClose son fişe sahip olan pozisyonu kapatır.