ProtoOAPosition

StockSharp.cTrader.Native.Model

* Trade position entity.

Реализует: IMessage<ProtoOAPosition>, IMessage, IEquatable<ProtoOAPosition>, IDeepCloneable<ProtoOAPosition>, IBufferMessage

Свойства

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

HasPrice : bool

Gets whether the "price" field is set

HasStopLoss : bool

Gets whether the "stopLoss" field is set

HasStopLossTriggerMethod : bool

Gets whether the "stopLossTriggerMethod" field is set

HasSwap : bool

Gets whether the "swap" 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.

Price : double

VWAP price of the position based on all executions (orders) linked to the position.

StopLoss : double

Current stop loss price.

StopLossTriggerMethod : ProtoOAOrderTriggerMethod

Stop trigger method for SL/TP of the position.

Swap : long

Total amount of charged swap on open 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.

Методы

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

Поля

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.