ProtoOAPosition
* Trade position entity.
Implements: IMessage<ProtoOAPosition>, IMessage, IEquatable<ProtoOAPosition>, IDeepCloneable<ProtoOAPosition>, IBufferMessage
Properties
Commission : long
Current unrealized commission related to the position.
GuaranteedStopLoss : bool
If TRUE then position's stop loss is guaranteedStopLoss.
HasCommission : bool
Gets whether the "commission" field is set
HasGuaranteedStopLoss : bool
Gets whether the "guaranteedStopLoss" field is set
HasMarginRate : bool
Gets whether the "marginRate" field is set
HasMirroringCommission : bool
Gets whether the "mirroringCommission" field is set
HasMoneyDigits : bool
Gets whether the "moneyDigits" field is set
HasPositionId : bool
Gets whether the "positionId" field is set
HasPositionStatus : bool
Gets whether the "positionStatus" field is set
HasStopLoss : bool
Gets whether the "stopLoss" field is set
HasStopLossTriggerMethod : bool
Gets whether the "stopLossTriggerMethod" field is set
HasTakeProfit : bool
Gets whether the "takeProfit" field is set
HasTrailingStopLoss : bool
Gets whether the "trailingStopLoss" field is set
HasUsedMargin : bool
Gets whether the "usedMargin" field is set
HasUtcLastUpdateTimestamp : bool
Gets whether the "utcLastUpdateTimestamp" field is set
MarginRate : double
Rate for used margin computation. Represented as Base/Deposit.
MirroringCommission : long
Amount of unrealized commission related to following of strategy provider.
MoneyDigits : uint
Specifies the exponent of the monetary values. E.g. moneyDigits = 8 must be interpret as business value multiplied by 10^8, then real balance would be 10053099944 / 10^8 = 100.53099944. Affects swap, commission, mirroringCommission, usedMargin.
PositionId : long
The unique ID of the position. Note: trader might have two positions with the same id if positions are taken from accounts from different brokers.
PositionStatus : ProtoOAPositionStatus
Current status of the position.
StopLossTriggerMethod : ProtoOAOrderTriggerMethod
Stop trigger method for SL/TP of the position.
TakeProfit : double
Current take profit price.
TradeData : ProtoOATradeData
Position details. See ProtoOATradeData for details.
TrailingStopLoss : bool
If TRUE then the Trailing Stop Loss is applied.
UsedMargin : ulong
Amount of margin used for the position in deposit currency.
UtcLastUpdateTimestamp : long
The Unix time in milliseconds of the last change of the position, including amend SL/TP of the position, execution of related order, cancel or related order, etc.
Methods
ClearCommission()
Clears the value of the "commission" field
ClearGuaranteedStopLoss()
Clears the value of the "guaranteedStopLoss" field
ClearMarginRate()
Clears the value of the "marginRate" field
ClearMirroringCommission()
Clears the value of the "mirroringCommission" field
ClearMoneyDigits()
Clears the value of the "moneyDigits" field
ClearPositionId()
Clears the value of the "positionId" field
ClearPositionStatus()
Clears the value of the "positionStatus" field
ClearPrice()
Clears the value of the "price" field
ClearStopLoss()
Clears the value of the "stopLoss" field
ClearStopLossTriggerMethod()
Clears the value of the "stopLossTriggerMethod" field
ClearSwap()
Clears the value of the "swap" field
ClearTakeProfit()
Clears the value of the "takeProfit" field
ClearTrailingStopLoss()
Clears the value of the "trailingStopLoss" field
ClearUsedMargin()
Clears the value of the "usedMargin" field
ClearUtcLastUpdateTimestamp()
Clears the value of the "utcLastUpdateTimestamp" field
Fields
CommissionFieldNumber : int
Field number for the "commission" field.
GuaranteedStopLossFieldNumber : int
Field number for the "guaranteedStopLoss" field.
MarginRateFieldNumber : int
Field number for the "marginRate" field.
MirroringCommissionFieldNumber : int
Field number for the "mirroringCommission" field.
MoneyDigitsFieldNumber : int
Field number for the "moneyDigits" field.
PositionIdFieldNumber : int
Field number for the "positionId" field.
PositionStatusFieldNumber : int
Field number for the "positionStatus" field.
PriceFieldNumber : int
Field number for the "price" field.
StopLossFieldNumber : int
Field number for the "stopLoss" field.
StopLossTriggerMethodFieldNumber : int
Field number for the "stopLossTriggerMethod" field.
SwapFieldNumber : int
Field number for the "swap" field.
TakeProfitFieldNumber : int
Field number for the "takeProfit" field.
TradeDataFieldNumber : int
Field number for the "tradeData" field.
TrailingStopLossFieldNumber : int
Field number for the "trailingStopLoss" field.
UsedMarginFieldNumber : int
Field number for the "usedMargin" field.
UtcLastUpdateTimestampFieldNumber : int
Field number for the "utcLastUpdateTimestamp" field.