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

Cancel
public void Cancel()
iPositionModifyAlgo.Cancel()

Cancel the current algo execution.

GetNextAction
public PositionModifyAction GetNextAction()
result = iPositionModifyAlgo.GetNextAction()

Get the next action to take. The call advances the algorithm: a returned Register counts as dispatched, so the caller places it and reports back through Decimal), OnOrderFailed or Decimal). An action that is discarded leaves the algorithm waiting for a report that never comes.

OnOrderCanceled
public void OnOrderCanceled(decimal matchedVolume)
iPositionModifyAlgo.OnOrderCanceled(matchedVolume)

Notify that an order was canceled.

matchedVolume
Volume that traded since the previous notification and before cancellation.
OnOrderFailed
public void OnOrderFailed()
iPositionModifyAlgo.OnOrderFailed()

Notify that an order failed. Nothing traded.

OnOrderMatched
public void OnOrderMatched(decimal matchedVolume)
iPositionModifyAlgo.OnOrderMatched(matchedVolume)

Notify that an order was matched.

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)
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.