- 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
Buy
Belirtilen parametrelerle bir uzun pozisyon açar.
bool Buy(
|
Parametreler
volume
[in] Pozisyon hacmi.
symbol=NULL
[in] Pozisyon sembolü. Sembol belirtilmemişse geçerli sembol kullanılır.
price=0.0
[in] Fiyat. Fiyat belirtilmemişse geçerli piyasa fiyatı (Ask) kullanılır.
sl=0.0
[in] Stop Loss (zararı durdur) fiyatı.
tp=0.0
[in] Take Profit (kar al) fiyatı.
comment=""
[in] Yorum.
Dönüş değeri
Yapı başarıyla denetlenirse 'true', aksi durumda 'false'.
Not
Buy(...) 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.