- OrderCalcMargin
- OrderCalcProfit
- OrderCheck
- OrderSend
- OrderSendAsync
- PositionsTotal
- PositionGetSymbol
- PositionSelect
- PositionSelectByTicket
- PositionGetDouble
- PositionGetInteger
- PositionGetString
- PositionGetTicket
- OrdersTotal
- OrderGetTicket
- OrderSelect
- OrderGetDouble
- OrderGetInteger
- OrderGetString
- HistorySelect
- HistorySelectByPosition
- HistoryOrderSelect
- HistoryOrdersTotal
- HistoryOrderGetTicket
- HistoryOrderGetDouble
- HistoryOrderGetInteger
- HistoryOrderGetString
- HistoryDealSelect
- HistoryDealsTotal
- HistoryDealGetTicket
- HistoryDealGetDouble
- HistoryDealGetInteger
- HistoryDealGetString
PositionSelectByTicket
Selects an open position to work with based on the ticket number specified in the position. If successful, returns true. Returns false if the function failed. Call GetLastError() for error details.
bool PositionSelectByTicket(
|
Parameters
ticket
[in] Position ticket.
Return Value
A value of the bool type.
Note
The PositionSelectByTicket() function copies position data to the program environment. Further calls of PositionGetDouble(), PositionGetInteger() and PositionGetString() return the previously copied data. Even if a position does not exist already (or its size, direction etc. has changed), the data may still be received sometimes. To make sure that you receive valid position data, it is recommended to call PositionSelectByTicket() before you access the data.
Example:
#define EXPERT_MAGIC 123456 // MagicNumber
|
See also