SecurityState

StockSharp.MatchingEngine

Состояние каждого финансового инструмента для механизма сопоставления. Содержит книгу заказов, менеджер заказов и определение финансового инструмента.

Конструкторы

SecurityState
public SecurityState(SecurityId securityId)
securityState = SecurityState(securityId)

Состояние каждого финансового инструмента для механизма сопоставления. Содержит книгу заказов, менеджер заказов и определение финансового инструмента.

Свойства

Definition
public SecurityMessage Definition { get; }
value = securityState.Definition

The definition the venue stated for this security, or when it has stated none. What the engine matches against is derived from it; whoever has to answer what the venue lists reads it here rather than keeping a second copy.

HasDepthSubscription
public bool HasDepthSubscription { get; }
value = securityState.HasDepthSubscription

Активна ли подписка на глубину.

IsMarketClosed
public bool IsMarketClosed { get; private set; }
value = securityState.IsMarketClosed
securityState.IsMarketClosed = value

Whether the market of this security is closed: its book holds only the orders resting in it, and an open position is valued at the quotes the market closed with.

LastTradePrice
public decimal? LastTradePrice { get; private set; }
value = securityState.LastTradePrice
securityState.LastTradePrice = value

The price the instrument last traded at, or when the venue has stated none. This is the price a stop is measured against, so it is also what a distance stated as a percent of the market is resolved from.

OrderBook
public OrderBook OrderBook { get; }
value = securityState.OrderBook

Книга заказов на этот финансовый инструмент.

OrderManager
public OrderLifecycleManager OrderManager { get; }
value = securityState.OrderManager

Активный менеджер заказов.

PriceStep
public decimal PriceStep { get; }
value = securityState.PriceStep

Шаг цены от определения финансового инструмента или автоматического обнаружения.

SecurityId
public SecurityId SecurityId { get; }
value = securityState.SecurityId

идентификатор финансового инструмента.

TradingState
public SecurityStates? TradingState { get; private set; }
value = securityState.TradingState
securityState.TradingState = value

Trading state as the venue last stated it, or when it never has.

VolumeStep
public decimal VolumeStep { get; }
value = securityState.VolumeStep

Объем шага от определения финансового инструмента или автоматически обнаружен.

Методы

CloseMarket
public void CloseMarket()
securityState.CloseMarket()

Close the market of this security: what the market offered leaves the book and the orders resting in it stay, while open positions keep the value of the best quotes it had until it quotes again.

ForgetBook
public void ForgetBook()
securityState.ForgetBook()

Forgets the book stated so far, so an incremental feed has to state a whole one again before its increments mean anything. What the engine currently holds is left standing.

ProcessMarketData
public void ProcessMarketData(MarketDataMessage msg)
securityState.ProcessMarketData(msg)

Обработка подписок на рыночные данные (только глубина).

ProcessQuoteChange
public void ProcessQuoteChange(QuoteChangeMessage msg, List<Message> results)
securityState.ProcessQuoteChange(msg, results)

Обработка изменения котировки (снимок) — обновление стакана заявок.

ProcessSecurity
public void ProcessSecurity(SecurityMessage msg)
securityState.ProcessSecurity(msg)

Обработать сообщение с определением финансового инструмента.

ProcessTradePrice
public void ProcessTradePrice(decimal price)
securityState.ProcessTradePrice(price)

Record the price the venue reports the instrument traded at.

price
Traded price.
ProcessTradingState
public void ProcessTradingState(SecurityStates state)
securityState.ProcessTradingState(state)

Record the trading state the venue reports for this security.

state
Trading state.
ReopenMarket
public void ReopenMarket()
securityState.ReopenMarket()

The market of this security quotes again: its book values open positions from now on.

TryGetClosePrice
public decimal? TryGetClosePrice(Sides closeSide)
result = securityState.TryGetClosePrice(closeSide)

The price a position in this security can be closed at by an order of : the best quote on the side that order takes from, or the one the market closed with while it is closed.

closeSide
Side of the order that would close the position.

Возвращает: The price, or when the market has not named one.

UpdateSteps
public void UpdateSteps(decimal price, decimal? volume)
securityState.UpdateSteps(price, volume)

Автоматическое определение шага цены/объема на основе рыночных данных.

price
Quoted price.
volume
Quoted volume.