IQuotingBehavior
StockSharp.Algo.Strategies.Quoting
Определяет поведение для расчета лучшей цены и определения необходимости котирования.
Методы
CalculateBestPrice
public decimal? CalculateBestPrice(Security security, IMarketDataProvider provider, Sides quotingDirection, decimal? bestBidPrice, decimal? bestAskPrice, decimal? lastTradePrice, decimal? lastTradeVolume, long lastTradeSeq, QuoteChange[] bids, QuoteChange[] asks)
result = iQuotingBehavior.CalculateBestPrice(security, provider, quotingDirection, bestBidPrice, bestAskPrice, lastTradePrice, lastTradeVolume, lastTradeSeq, bids, asks)
Calculates the best price for quoting based on market data.
- security
- Security
- provider
- IMarketDataProvider
- quotingDirection
- The direction of quoting (Buy or Sell).
- bestBidPrice
- The best bid price in the order book.
- bestAskPrice
- The best ask price in the order book.
- lastTradePrice
- The price of the last trade.
- lastTradeVolume
- The volume of the last trade.
- lastTradeSeq
- The identity of the last trade. It stays unchanged while the same trade is presented again, so a behavior that accumulates can count each trade once.
- bids
- Array of bid quotes from the order book.
- asks
- Array of ask quotes from the order book.
Возвращает: The calculated best price for quoting, or null if unavailable.
NeedQuoting
public decimal? NeedQuoting(Security security, IMarketDataProvider provider, DateTime currentTime, decimal? currentPrice, decimal? currentVolume, decimal newVolume, decimal? bestPrice)
result = iQuotingBehavior.NeedQuoting(security, provider, currentTime, currentPrice, currentVolume, newVolume, bestPrice)
Определяет необходимость котирования на основе текущего состояния ордера и рыночных условий.
- security
- финансовый инструмент
- provider
- IMarketDataProvider
- currentTime
- Текущее время.
- currentPrice
- Текущая цена ордера или ноль, если он не зарегистрирован.
- currentVolume
- Текущий объем ордера или ноль, если он не зарегистрирован.
- newVolume
- Новый том, который будет цитироваться.
- bestPrice
- Рассчитанная лучшая цена для котировки.
Возвращает: Цена, по которой котируется, или ноль, если в котировке нет необходимости.