Class MetatraderPosition


  • public class MetatraderPosition
    extends Object
    MetaTrader position
    • Field Detail

      • id

        public String id
        Position id (ticket number)
      • symbol

        public String symbol
        Position symbol
      • magic

        public int magic
        Position magic number, identifies the EA which opened the position
      • time

        public IsoTime time
        Time position was opened at
      • updateTime

        public IsoTime updateTime
        Last position modification time
      • openPrice

        public double openPrice
        Position open price
      • currentPrice

        public double currentPrice
        Current price
      • currentTickValue

        public double currentTickValue
        Current tick value
      • stopLoss

        public Double stopLoss
        Position stop loss price or null
      • takeProfit

        public Double takeProfit
        Position take profit price or null
      • volume

        public double volume
        Position volume
      • swap

        public double swap
        Position cumulative swap
      • profit

        public double profit
        Position cumulative profit
      • comment

        public String comment
        Position 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/
      • 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/
      • unrealizedProfit

        public Double unrealizedProfit
        Profit of the part of the position which is not yet closed, including swap, or null
      • realizedProfit

        public Double realizedProfit
        Profit of the already closed part, including commissions and swap, or null
      • commission

        public Double commission
        Position commission
    • Constructor Detail

      • MetatraderPosition

        public MetatraderPosition()