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
- 担当: 佐藤 宏
- currentTime
- 現行時刻
- currentPrice
- 注文の現在の価格、または登録されていない場合はnull。
- currentVolume
- 注文の現在のボリューム、または登録されていない場合はnull。
- newVolume
- 引用されるべき新しい容積。
- bestPrice
- 見積りの計算された最高の価格。
戻り値: 引用符が不要な場合は、引用符で引用する価格、またはnull。