QuotingBehaviorAlgo
StockSharp.Algo.Strategies.Quoting
Position modify algorithm that delegates price calculation to IQuotingBehavior.
Implements: IPositionModifyAlgo, IDisposable
Constructors
QuotingBehaviorAlgo
public QuotingBehaviorAlgo(IQuotingBehavior behavior, Sides side, decimal volume, Unit volumePart, Security security)
quotingBehaviorAlgo = QuotingBehaviorAlgo(behavior, side, volume, volumePart, security)
Initializes a new instance of the QuotingBehaviorAlgo.
- behavior
- Quoting behavior for price calculation.
- side
- Order side.
- volume
- Total volume to execute.
- volumePart
- Volume part for each slice.
- security
- Security (optional, for behaviors that need PriceStep).
Properties
IsFinished
public bool IsFinished { get; }
value = quotingBehaviorAlgo.IsFinished
Whether the algorithm has finished.
RemainingVolume
public decimal RemainingVolume { get; private set; }
value = quotingBehaviorAlgo.RemainingVolume
quotingBehaviorAlgo.RemainingVolume = value
Remaining volume to execute.
Methods
Dispose
public void Dispose()
quotingBehaviorAlgo.Dispose()
Disposes of items in the pool that implement IDisposable.
GetNextAction
public PositionModifyAction GetNextAction()
result = quotingBehaviorAlgo.GetNextAction()
Get the next action to take.
OnOrderCanceled
public void OnOrderCanceled(decimal matchedVolume)
quotingBehaviorAlgo.OnOrderCanceled(matchedVolume)
Notify that an order was canceled.
- matchedVolume
- Volume that was matched before cancellation.
OnOrderFailed
public void OnOrderFailed()
quotingBehaviorAlgo.OnOrderFailed()
Notify that an order failed.
OnOrderMatched
public void OnOrderMatched(decimal matchedVolume)
quotingBehaviorAlgo.OnOrderMatched(matchedVolume)
Notify that an order was matched (fully filled).
UpdateMarketData
public void UpdateMarketData(DateTime time, decimal? price, decimal? volume)
quotingBehaviorAlgo.UpdateMarketData(time, price, volume)
Update market data.
- time
- Current time.
- price
- Last trade price.
- volume
- Last trade volume.
UpdateOrderBook
public void UpdateOrderBook(IOrderBookMessage depth)
quotingBehaviorAlgo.UpdateOrderBook(depth)
Update order book data.
- depth
- Order book.