Class MetatraderPosition
- java.lang.Object
-
- cloud.metaapi.sdk.clients.meta_api.models.MetatraderPosition
-
public class MetatraderPosition extends Object
MetaTrader position
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMetatraderPosition.PositionReasonPosition opening reason.static classMetatraderPosition.PositionTypePosition type
-
Field Summary
Fields Modifier and Type Field Description StringclientIdClient-assigned id ornull.StringcommentPosition comment ornull.DoublecommissionPosition commissiondoublecurrentPriceCurrent pricedoublecurrentTickValueCurrent tick valueStringidPosition id (ticket number)intmagicPosition magic number, identifies the EA which opened the positiondoubleopenPricePosition open pricedoubleprofitPosition cumulative profitDoublerealizedProfitProfit of the already closed part, including commissions and swap, ornullMetatraderPosition.PositionReasonreasonPosition opening reasonDoublestopLossPosition stop loss price ornulldoubleswapPosition cumulative swapStringsymbolPosition symbolDoubletakeProfitPosition take profit price ornullIsoTimetimeTime position was opened atMetatraderPosition.PositionTypetypePosition typeDoubleunrealizedProfitProfit of the part of the position which is not yet closed, including swap, ornullIsoTimeupdateTimeLast position modification timedoublevolumePosition volume
-
Constructor Summary
Constructors Constructor Description MetatraderPosition()
-
-
-
Field Detail
-
id
public String id
Position id (ticket number)
-
type
public MetatraderPosition.PositionType type
Position type
-
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 ornull
-
takeProfit
public Double takeProfit
Position take profit price ornull
-
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 ornull. 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 ornull. 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, ornull
-
realizedProfit
public Double realizedProfit
Profit of the already closed part, including commissions and swap, ornull
-
commission
public Double commission
Position commission
-
reason
public MetatraderPosition.PositionReason reason
Position opening reason
-
-