IQuotingBehavior

StockSharp.Algo.Strategies.Quoting

Define el comportamiento para calcular el mejor precio y determinar si se necesita citación.

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.

Devuelve: 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 si se requiere la citación basada en el estado actual del orden y las condiciones del mercado.

security
instrumento financiero
provider
IMarketDataProvider
currentTime
El momento actual.
currentPrice
El precio actual de la orden, o nulo si no está registrado.
currentVolume
El volumen actual de la orden, o nulo si no está registrado.
newVolume
El nuevo volumen que se cita.
bestPrice
El mejor precio calculado para la cita.

Devuelve: El precio a citar o nulo si no se necesita citar.