Show all active orders displayed on the "Trade" tab. For active positions use MT5.ShowPositions() instead.

MT5.ShowOrders()

Value

Returns Data.frame \([nx7]\), with follow informations:

  • sSymbol {character}: order's symbol.

  • iType {int} order's type, for more see references:

    • 2: ORDER_TYPE_BUY_LIMIT

    • 3: ORDER_TYPE_SELL_LIMIT

  • fVolume {numeric}: order's volume.

  • fPrice {numeric}: order's price.

  • fStop {numeric}: order's stop loss. For stop loss not set is returned 0.

  • fGain {numeric}: order's stop gain. For stop gain not set is returned 0.

  • iTicket {int}: order's ticket. Same displayed on the "Trade" tab. Used in other functions in mt5R package.

References

https://www.mql5.com/en/articles/2513

See also

Examples

if (FALSE) { MT5.ShowOrders() ## Returns ## sSymbol iType fVolume fPrice fStop fGain iTicket ## 1 NZDUSD 2 0.10 0.682 0.00000 0 763153 ## 2 NZDUSD 2 0.10 0.661 0.00000 0 763194 ## 3 GBPUSD 2 0.01 1.330 1.32956 0 766489 }