Class MetatraderOrder


  • public class MetatraderOrder
    extends Object
    MetaTrader order
    • Field Detail

      • id

        public String id
        Order id (ticket number)
      • magic

        public int magic
        Order magic number, identifies the EA which created the order
      • time

        public IsoTime time
        Time order was created at
      • doneTime

        public IsoTime doneTime
        Time order was executed or canceled at or null. Will be specified for completed orders only
      • symbol

        public String symbol
        Order symbol
      • openPrice

        public Double openPrice
        Order open price (market price for market orders, limit price for limit orders or stop price for stop orders) or null
      • currentPrice

        public double currentPrice
        Current price
      • stopLoss

        public Double stopLoss
        Order stop loss price or null
      • takeProfit

        public Double takeProfit
        Order take profit price or null
      • volume

        public double volume
        Order requested quantity
      • currentVolume

        public double currentVolume
        Order remaining quantity, i.e. requested quantity - filled quantity
      • positionId

        public String positionId
        Order position id or null. Present only if the order has a position attached to it
      • comment

        public String comment
        Order comment or null. The sum of the line lengths of the comment and the clientId must be less than or equal to 26. For more information see https://metaapi.cloud/docs/client/clientIdUsage/
      • originalComment

        public String originalComment
        Order original comment or null (present if possible to restore original comment from history)
      • clientId

        public String clientId
        Client-assigned id or null. The id value can be assigned when submitting a trade and will be present on position, history orders and history deals related to the trade. You can use this field to bind your trades to objects in your application and then track trade progress. The sum of the line lengths of the comment and the clientId must be less than or equal to 26. For more information see https://metaapi.cloud/docs/client/clientIdUsage/
      • platform

        public String platform
        Platform id (mt4 or mt5)
      • updatePending

        public Boolean updatePending
        Optional flag indicating that order client id and original comment was not identified yet and will be updated in a future synchronization packet, or null
      • expirationTime

        public IsoTime expirationTime
        Optional order expiration time or null
    • Constructor Detail

      • MetatraderOrder

        public MetatraderOrder()