Description Usage Value Author(s) References See Also Examples
Show all active positions displayed on the "Trade" tab. For active orders use MT5.ShowOrders()
instead.
1 |
Returns Data.frame [nx8], with follow informations:
sSymbol {character}
: position's symbol.
iCmd {int}
position's type, for more see references:
0: POSITION_TYPE_BUY
1: POSITION_TYPE_SELL
fVolume {numeric}
: position's volume.
fPrice {numeric}
: position's price.
fStop {numeric}
: position's stop loss. For stop loss not set is returned 0
.
fGain {numeric}
: position's stop gain. For stop gain not set is returned 0
.
fProfit {numeric}
: position's profit/loss. Same displayed on the "Trade" tab.
iTicket {int}
: position's ticket. Same displayed on the MT5's "Trade" tab. Used in other functions in mt5R package.
Guilherme Kinzel, guikinzel@gmail.com
https://www.mql5.com/en/docs/constants/tradingconstants/positionproperties
MT5.ShowOrders()
, MT5.ClosePosition()
, MT5.ModifyPosition()
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
MT5.ShowPositions()
## Returns
## sSymbol iCmd fVolume fPrice fStop fGain fProfit iTicket
## 1 CADJPY 1 0.01 81.09000 0.0000 0 0.47 766491
## 2 CADJPY 0 0.01 81.11700 0.0000 0 -1.00 766490
## 3 EURUSD 0 0.01 1.22592 0.0000 0 0.77 766488
## 4 NZDUSD 0 0.10 0.71160 0.7106 0 29.50 763964
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.