- 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
PositionOpen
Belirtilen parametrelerle bir pozisyon açar.
bool PositionOpen(
|
Parametreler
symbol
[in] Pozisyon açmak için kullanılacak enstrümanın ismi.
order_type
[in] Pozisyon açmak için kullanılacak emir tipi (ENUM_ORDER_TYPE sayımının değerlerinden biri).
volume
[in] İstenen pezisyon hacmi.
price
[in] Pozisyon açmak için istenen fiyat.
sl
[in] Stop Loss için tetiklenme fiyatı.
tp
[in] Take Profit tetiklenme fiyatı.
comment=""
[in] Pozisyon yorumu.
Dönüş değeri
Temel yapılar başarıyla denetlenirse 'true', aksi durumda 'false'.
Not
PositionOpen(...) 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 ve ResultDeal() yönteminin dönüş değeri kullanılarak denetlenmesi önemlidir.