QuotingBehaviorAlgo
StockSharp.Algo.Strategies.Quoting
位置修改算法,将价格计算结果下放到 IQuotingBehavior 。
实现: IPositionModifyAlgo, IDisposable
构造函数
QuotingBehaviorAlgo
public QuotingBehaviorAlgo(IQuotingBehavior behavior, Sides side, decimal volume, Unit volumePart, Security security)
quotingBehaviorAlgo = QuotingBehaviorAlgo(behavior, side, volume, volumePart, security)
初始化了 & ##QuotingBehaviorAlgo+#的新实例.
- behavior
- 以行为为价格计算标准。
- side
- 秩序一边.
- volume
- 执行总量.
- volumePart
- 每片的分量部分。
- security
- 金融工具(可选,对于需要PriceStep的行为)。
属性
RemainingVolume
public decimal RemainingVolume { get; private set; }
value = quotingBehaviorAlgo.RemainingVolume
quotingBehaviorAlgo.RemainingVolume = value
剩余量待执行 。
方法
GetNextAction
public PositionModifyAction GetNextAction()
result = quotingBehaviorAlgo.GetNextAction()
得到下一步行动。
OnOrderCanceled
public void OnOrderCanceled(decimal matchedVolume)
quotingBehaviorAlgo.OnOrderCanceled(matchedVolume)
通知命令已被取消 。
- matchedVolume
- 取消前的音量匹配 。
OnOrderMatched
public void OnOrderMatched(decimal matchedVolume)
quotingBehaviorAlgo.OnOrderMatched(matchedVolume)
通知一项命令是否匹配(完全填写)。
- matchedVolume
- Volume that traded since the previous notification for this order: a caller reporting every partial fill passes the increment, one reporting only the end passes the whole traded volume. The same volume is never reported twice.
UpdateMarketData
public void UpdateMarketData(DateTime time, decimal? price, decimal? volume)
quotingBehaviorAlgo.UpdateMarketData(time, price, volume)
更新市场数据.
- time
- 现相相相.
- price
- 最后一笔交易价格。
- volume
- 最后一笔交易量。
UpdateOrderBook
public void UpdateOrderBook(IOrderBookMessage depth)
quotingBehaviorAlgo.UpdateOrderBook(depth)
更新订单书数据.
- depth
- 令书.