Class Position
- Namespace
- StockSharp.BusinessEntities
- Assembly
- StockSharp.BusinessEntities.dll
The position by the instrument.
[DataContract]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Position", Description = "PositionDesc")]
public class Position : NotifiableObject, INotifyPropertyChangedEx, INotifyPropertyChanged, INotifyPropertyChanging, ILocalTimeMessage, IServerTimeMessage
- Inheritance
-
Position
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
Position()
Initializes a new instance of the Position.
public Position()
Properties
AveragePrice
Average price.
[Display(ResourceType = typeof(LocalizedStrings), Name = "AveragePrice", Description = "AveragePriceCalcTrades", GroupName = "Statistics")]
[Browsable(false)]
public decimal? AveragePrice { get; set; }
Property Value
BeginValue
Position size at the beginning of the trading session.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "BeginValue", Description = "PosBeginValue", GroupName = "Statistics")]
[Browsable(false)]
public decimal? BeginValue { get; set; }
Property Value
BlockedValue
Position size, registered for active orders.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Blocked", Description = "PosBlockedSize", GroupName = "Statistics")]
[Browsable(false)]
public decimal? BlockedValue { get; set; }
Property Value
BuyOrdersCount
Orders (bids).
[Browsable(false)]
public int? BuyOrdersCount { get; set; }
Property Value
- int?
BuyOrdersMargin
Margin (buy).
[Browsable(false)]
public decimal? BuyOrdersMargin { get; set; }
Property Value
ClientCode
Client code assigned by the broker.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "ClientCode", Description = "ClientCodeDesc", GroupName = "General")]
public string ClientCode { get; set; }
Property Value
Commission
Total commission.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Commission", Description = "TotalCommissionDesc", GroupName = "Statistics")]
[Browsable(false)]
public decimal? Commission { get; set; }
Property Value
CommissionMaker
Commission (maker).
[Browsable(false)]
public decimal? CommissionMaker { get; set; }
Property Value
CommissionTaker
Commission (taker).
[Browsable(false)]
public decimal? CommissionTaker { get; set; }
Property Value
Currency
Portfolio currency.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Currency", Description = "PortfolioCurrency", GroupName = "General")]
public CurrencyTypes? Currency { get; set; }
Property Value
CurrentPrice
Position price.
[Display(ResourceType = typeof(LocalizedStrings), Name = "PosPrice", Description = "PosPriceDesc", GroupName = "Statistics")]
[Browsable(false)]
public decimal? CurrentPrice { get; set; }
Property Value
CurrentValue
Current position size.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "CurrentValue", Description = "CurrentPosSize", GroupName = "Statistics")]
[BasicSetting]
public decimal? CurrentValue { get; set; }
Property Value
DepoName
The depositary where the physical security.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Depo", Description = "DepoName", GroupName = "General")]
[DataMember]
public string DepoName { get; set; }
Property Value
Description
Text position description.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Description", Description = "PosText", GroupName = "General")]
public string Description { get; set; }
Property Value
ExpirationDate
Expiration date.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "ExpiryDate", Description = "ExpiryDate", GroupName = "General")]
public DateTimeOffset? ExpirationDate { get; set; }
Property Value
LastChangeTime
Time of last position change.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Changed", Description = "TimePosLastChange", GroupName = "Statistics")]
[Browsable(false)]
public DateTimeOffset LastChangeTime { get; set; }
Property Value
Leverage
Margin leverage.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Leverage", Description = "MarginLeverage", GroupName = "General")]
public decimal? Leverage { get; set; }
Property Value
LimitType
Limit type for Т+ market.
[Display(ResourceType = typeof(LocalizedStrings), Name = "Limit", Description = "PosLimit", GroupName = "General")]
[DataMember]
public TPlusLimits? LimitType { get; set; }
Property Value
LiquidationPrice
Liquidation price.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "LiquidationPrice", Description = "LiquidationPrice", GroupName = "Statistics")]
[Browsable(false)]
public decimal? LiquidationPrice { get; set; }
Property Value
LocalTime
Local time of the last position change.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "LocalTime", Description = "LocalTimeDesc", GroupName = "Statistics")]
[Browsable(false)]
public DateTimeOffset LocalTime { get; set; }
Property Value
OrdersCount
Orders.
[Browsable(false)]
public int? OrdersCount { get; set; }
Property Value
- int?
OrdersMargin
Orders (margin).
[Browsable(false)]
public decimal? OrdersMargin { get; set; }
Property Value
Portfolio
Portfolio, in which position is created.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Portfolio", Description = "PosPortfolio", GroupName = "General")]
public Portfolio Portfolio { get; set; }
Property Value
PortfolioName
Portfolio name.
[Browsable(false)]
public virtual string PortfolioName { get; }
Property Value
RealizedPnL
Realized profit.
[Display(ResourceType = typeof(LocalizedStrings), Name = "RealizedProfit", Description = "RealizedProfitDesc", GroupName = "Statistics")]
[Browsable(false)]
public decimal? RealizedPnL { get; set; }
Property Value
Security
Security, for which a position was created.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Security", Description = "PosSecurity", GroupName = "General")]
public Security Security { get; set; }
Property Value
SellOrdersCount
Orders (asks).
[Browsable(false)]
public int? SellOrdersCount { get; set; }
Property Value
- int?
SellOrdersMargin
Margin (sell).
[Browsable(false)]
public decimal? SellOrdersMargin { get; set; }
Property Value
SettlementPrice
Settlement price.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "SettlementPrice", Description = "SettlementPriceDesc", GroupName = "Statistics")]
[Browsable(false)]
public decimal? SettlementPrice { get; set; }
Property Value
Side
Side.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Side", Description = "PosSide", GroupName = "General", Order = 101)]
public virtual Sides? Side { get; set; }
Property Value
StrategyId
Strategy id.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "Strategy", Description = "Identifier", GroupName = "General", Order = 100)]
public virtual string StrategyId { get; set; }
Property Value
TradesCount
Trades.
[Browsable(false)]
public int? TradesCount { get; set; }
Property Value
- int?
UnrealizedPnL
Unrealized profit.
[Display(ResourceType = typeof(LocalizedStrings), Name = "UnrealizedProfit", Description = "UnrealizedProfitDesc", GroupName = "Statistics")]
[Browsable(false)]
public decimal? UnrealizedPnL { get; set; }
Property Value
VariationMargin
Variation margin.
[DataMember]
[Display(ResourceType = typeof(LocalizedStrings), Name = "VariationMargin", Description = "VariationMarginDesc", GroupName = "Statistics")]
[Browsable(false)]
public decimal? VariationMargin { get; set; }
Property Value
Methods
Clone()
Create a copy of Position.
public virtual Position Clone()
Returns
- Position
Copy.
CopyTo(Position)
To copy fields of the current position to destination.
public void CopyTo(Position destination)
Parameters
destinationPositionThe position in which you should to copy fields.
ToString()
public override string ToString()