- 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
BuyLimit
Places the pending order of Buy Limit type (buy at the price lower than current market price) with specified parameters.
bool BuyLimit(
|
Parameters
volume
[in] Requested order volume.
price
[in] Order price.
symbol=NULL
[in] Order symbol. If the symbol is not specified, the current symbol will be used.
sl=0.0
[in] Stop Loss price.
tp=0.0
[in] Take Profit price.
type_time=ORDER_TIME_GTC
[in] Order lifetime from ENUM_ORDER_TYPE_TIME enumeration.
expiration=0
[in] Order expiration time (used only if type_time=ORDER_TIME_SPECIFIED).
comment=""
[in] Order comment.
Return Value
true - successful check of the structures, otherwise - false.
Note
Successful completion of the BuyLimit(...) method does not always mean successful execution of the trade operation. It is necessary to check the result of trade request (trade server return code) using ResultRetcode() and value returned by ResultOrder().