Description Usage Arguments Details Value Author(s) See Also Examples
Send a request to delete orders in MT5.
1 | MT5.DeleteOrder(iTickets)
|
int |
int(); vector of tickets orders to delete. |
For iTickers users can use MT5.ShowOrders()
to obtain it.
(STOCKS ONLY) WARNING - Poor written MT5's servers
I had some problems running this function in some brokers and doesn't in others.
All brokers that are winged by XP Investimentos (BR broker), the MT5's server try to close another nonexistent order (order #0)
The same error don't occurs in Modal (BR broker) server. In all cases, the order is deleted anyway.
Use this function very carefully if you notice that the MT5's server broker was poor written.
I already tried to fix into MQL code in every way. All forms to remove the order result in the same outcome.
For who is experiencing this problem, take note that the mt5R plataform takes approximately 3 minutes to recover itself.
Poor fix: the trader can use MT5.ModifyOrder()
to change fPrice to unviable levels and waits to order expire.
Returns TRUE
if order was successful deleted, FALSE
otherwise.
Guilherme Kinzel, guikinzel@gmail.com
MT5.SingleOrder()
, MT5.MultipleOrders()
, MT5.ShowPositions()
, MT5.ShowOrders()
, MT5.ModifyOrder()
, MT5.ClosePosition()
, MT5.ModifyPosition()
1 2 3 4 5 6 | ## Not run:
# Delete pending order 832136429
MT5.DeleteOrder(832136429)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.