MarketOrderAlgo

StockSharp.Algo.PositionManagement

Market order execution algorithm.

Implements: IPositionModifyAlgo, IDisposable

Constructors

MarketOrderAlgo
public MarketOrderAlgo(Sides side, decimal volume)
marketOrderAlgo = MarketOrderAlgo(side, volume)

Initializes a new instance of the MarketOrderAlgo.

side
Order side.
volume
Total volume to execute.

Properties

IsFinished
public bool IsFinished { get; }
value = marketOrderAlgo.IsFinished

Whether the algorithm has finished.

RemainingVolume
public decimal RemainingVolume { get; }
value = marketOrderAlgo.RemainingVolume

Remaining volume to execute.

Methods

Cancel
public void Cancel()
marketOrderAlgo.Cancel()

Cancel the current algo execution.

Dispose
public void Dispose()
marketOrderAlgo.Dispose()

Disposes of items in the pool that implement IDisposable.

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

Get the next action to take.

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

Notify that an order was canceled.

matchedVolume
Volume that was matched before cancellation.
OnOrderFailed
public void OnOrderFailed()
marketOrderAlgo.OnOrderFailed()

Notify that an order failed.

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

Notify that an order was matched (fully filled).

UpdateMarketData
public void UpdateMarketData(DateTime time, decimal? price, decimal? volume)
marketOrderAlgo.UpdateMarketData(time, price, volume)

Update market data.

time
Current time.
price
Last trade price.
volume
Last trade volume.
UpdateOrderBook
public void UpdateOrderBook(IOrderBookMessage depth)
marketOrderAlgo.UpdateOrderBook(depth)

Update order book data.

depth
Order book.