IPositionModifyAlgo
StockSharp.Algo.PositionManagement
Interface for position modify algorithms (detached from Diagram).
Implements: IDisposable
Properties
IsFinished
public bool IsFinished { get; }
value = iPositionModifyAlgo.IsFinished
Whether the algorithm has finished.
RemainingVolume
public decimal RemainingVolume { get; }
value = iPositionModifyAlgo.RemainingVolume
Remaining volume to execute.
Methods
GetNextAction
public PositionModifyAction GetNextAction()
result = iPositionModifyAlgo.GetNextAction()
Get the next action to take.
OnOrderCanceled
public void OnOrderCanceled(decimal matchedVolume)
iPositionModifyAlgo.OnOrderCanceled(matchedVolume)
Notify that an order was canceled.
- matchedVolume
- Volume that was matched before cancellation.
OnOrderFailed
public void OnOrderFailed()
iPositionModifyAlgo.OnOrderFailed()
Notify that an order failed.
OnOrderMatched
public void OnOrderMatched(decimal matchedVolume)
iPositionModifyAlgo.OnOrderMatched(matchedVolume)
Notify that an order was matched (fully filled).
UpdateMarketData
public void UpdateMarketData(DateTime time, decimal? price, decimal? volume)
iPositionModifyAlgo.UpdateMarketData(time, price, volume)
Update market data.
- time
- Current time.
- price
- Last trade price.
- volume
- Last trade volume.
UpdateOrderBook
public void UpdateOrderBook(IOrderBookMessage depth)
iPositionModifyAlgo.UpdateOrderBook(depth)
Update order book data.
- depth
- Order book.