Description Usage Arguments Details Value Author(s) See Also Examples
Modification of characteristics of the previously opened position. To modify an existing pending order use MT5.ModifyOrder()
instead.
It can be used targeting only one or several positions at once. See details.
Use MT5.ShowPositions()
or look at "Trade" tab, to fetch iTickets
.
1 | MT5.ModifyPosition(iTicket = 0, fStop = 0, fGain = 0, ...)
|
iTicket |
integer; positions's ticket. |
fStop |
numeric; target stop loss. To remove stop loss use |
fGain |
numeric; target stop gain. To remove stop gain use |
... |
data.frame; using |
It need to choose a data.frame
or just one position at time to modify. Not both. An attempt using both a warning will pop up and data.frame
will be used.
Returns TRUE
if position was successful modified, no changes and otherwise will return FALSE
.
If used data.frame
it will return logical
vector.
Guilherme Kinzel, guikinzel@gmail.com
MT5.SingleOrder()
, MT5.MultipleOrders()
, MT5.ShowOrders()
, MT5.ShowPositions()
, MT5.ClosePosition()
, MT5.DeleteOrder()
, MT5.ModifyOrder()
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
## Below examples of an existing buy position (663502899)
MT5.ModifyPosition(iTicket = 663502899, fStop = 29)
## Using data.frame for multiple modifications
df_modify <- data.frame(iTicket = 663502899, fStop = 29)
df_modify <- rbind(df_modify, data.frame(iTicket = 663502211, fStop = 130))
MT5.ModifyPosition(... = df_modify)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.