IQuotingBehavior
StockSharp.Algo.Strategies.Quoting
Define o comportamento para calcular o melhor preço e determinar se é necessário citar.
Métodos
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.
Retorna: 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)
Determina se a citação é necessária com base no estado de ordem atual e nas condições de mercado.
- security
- instrumento financeiro
- provider
- IMarketDataProvider
- currentTime
- A hora atual.
- currentPrice
- O preço atual da ordem, ou nulo se não registrado.
- currentVolume
- O volume atual da ordem, ou nulo, se não registrado.
- newVolume
- O novo volume a ser citado.
- bestPrice
- O melhor preço calculado para citar.
Retorna: O preço a ser citado ou nulo se não for necessário.