- 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
OrderOpen
Places the pending order with set parameters.
bool OrderOpen(
|
Parameters
symbol
[in] Name of trade instrument.
order_type
[in] Type of order trade operation from ENUM_ORDER_TYPE enumeration.
volume
[in] Requested order volume.
limit_price
[in] Price at which the StopLimit order will be placed.
price
[in] Price at which the order must be executed.
sl
[in] Price at which the Stop Loss will trigger.
tp
[in] Price at which the Take Profit will trigger.
type_time
[in] Order type by execution from ENUM_ORDER_TYPE_TIME enumeration.
expiration
[in] Expiration date of pending order.
comment=""
[in] Order comment.
Return Value
true - successful check of the basic structures, otherwise - false.
Note
Successful completion of the OrderSend(...) method does not always mean successful execution of the trade operation. It is necessary to check the result of a trade request (trade server return code) using ResultRetcode() and value returned by ResultOrder().