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
security
Securityprovider
IMarketDataProviderquotingDirection
SidesThe direction of quoting (Buy or Sell).
bestBidPrice
decimal?The best bid price in the order book.
bestAskPrice
decimal?The best ask price in the order book.
lastTradePrice
decimal?The price of the last trade.
bids
QuoteChange[]Array of bid quotes from the order book.
asks
QuoteChange[]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
security
Securityprovider
IMarketDataProvidercurrentTime
DateTimeOffsetThe current time.
currentPrice
decimal?The current price of the order, or null if not registered.
currentVolume
decimal?The current volume of the order, or null if not registered.
newVolume
decimalThe new volume to be quoted.
bestPrice
decimal?The calculated best price for quoting.
Returns
- decimal?
The price to quote at, or null if quoting is not needed.