- Time
- TimeMsc
- TimeUpdate
- TimeUpdateMsc
- PositionType
- TypeDescription
- Magic
- Identifier
- Volume
- PriceOpen
- StopLoss
- TakeProfit
- PriceCurrent
- Commission
- Swap
- Profit
- Symbol
- Comment
- InfoInteger
- InfoDouble
- InfoString
- Select
- SelectByIndex
- SelectByMagic
- SelectByTicket
- StoreState
- CheckState
CPositionInfo
CPositionInfo is a class for easy access to the open position properties.
Description
CPositionInfo class provides easy access to the open position properties.
Declaration
class CPositionInfo : public CObject |
Title
#include <Trade\PositionInfo.mqh> |
Inheritance hierarchyCPositionInfo |
Class methods by groups
Access to integer type properties |
|
---|---|
Gets the time of position opening |
|
Receives the time of position opening in milliseconds since 01.01.1970 |
|
Receives the time of position changing in seconds since 01.01.1970 |
|
Receives the time of position changing in milliseconds since 01.01.1970 |
|
Gets the position type |
|
Gets the position type as a string |
|
Gets the ID of expert, that opened the position |
|
Gets the ID of position |
|
Access to double type properties |
|
Gets the volume of position |
|
Gets the price of position opening |
|
Gets the price of position's Stop Loss |
|
Gets the price of position's Take Profit |
|
Gets the current price by position symbol |
|
Gets the amount of commission by position |
|
Gets the amount of swap by position |
|
Gets the amount of current profit by position |
|
Access to text properties |
|
Gets the name of position symbol |
|
Gets the comment of the position |
|
Access to MQL5 API functions |
|
Gets the value of specified integer type property |
|
Gets the value of specified double type property |
|
Gets the value of specified string type property |
|
Selection |
|
Selects the position |
|
Selects the position by index |
|
Selects a position with the specified symbol name and magic number |
|
Selects the position by ticket |
|
State |
|
Saves the position parameters |
|
Checks the current parameters against the saved parameters |