Interface IQuotingBehavior
- Namespace
- StockSharp.Algo.Strategies.Quoting
- Assembly
- StockSharp.Algo.dll
Defines the behavior for calculating the best price and determining if quoting is needed.
public interface IQuotingBehavior
- Extension Methods
Methods
CalculateBestPrice(Security, IMarketDataProvider, Sides, decimal?, decimal?, decimal?, QuoteChange[], QuoteChange[])
Calculates the best price for quoting based on market data.
decimal? CalculateBestPrice(Security security, IMarketDataProvider provider, Sides quotingDirection, decimal? bestBidPrice, decimal? bestAskPrice, decimal? lastTradePrice, QuoteChange[] bids, QuoteChange[] asks)
Parameters
securitySecurityproviderIMarketDataProviderquotingDirectionSidesThe direction of quoting (Buy or Sell).
bestBidPricedecimal?The best bid price in the order book.
bestAskPricedecimal?The best ask price in the order book.
lastTradePricedecimal?The price of the last trade.
bidsQuoteChange[]Array of bid quotes from the order book.
asksQuoteChange[]Array of ask quotes from the order book.
Returns
- decimal?
The calculated best price for quoting, or null if unavailable.
NeedQuoting(Security, IMarketDataProvider, DateTimeOffset, decimal?, decimal?, decimal, decimal?)
Determines if quoting is required based on the current order state and market conditions.
decimal? NeedQuoting(Security security, IMarketDataProvider provider, DateTimeOffset currentTime, decimal? currentPrice, decimal? currentVolume, decimal newVolume, decimal? bestPrice)
Parameters
securitySecurityproviderIMarketDataProvidercurrentTimeDateTimeOffsetThe current time.
currentPricedecimal?The current price of the order, or null if not registered.
currentVolumedecimal?The current volume of the order, or null if not registered.
newVolumedecimalThe new volume to be quoted.
bestPricedecimal?The calculated best price for quoting.
Returns
- decimal?
The price to quote at, or null if quoting is not needed.