IcebergAlgo

StockSharp.Algo.PositionManagement

Iceberg - keep one resting limit order with only DisplayVolume visible. When the displayed slice fills, the algo emits the next slice at the same price (until total volume is exhausted or it is cancelled). Pure venue-agnostic implementation: the algo doesn't ask the venue for native iceberg support; it manages the slicing itself by re-registering after each fill. Native-iceberg venues stay compatible (the algo simply runs one slice end-to-end and then is finished if the venue accepted the bulk size - but most regulated venues now ban naked icebergs, so client-side slicing is the portable path).

Implementa: IPositionModifyAlgo, IDisposable

Construtores

IcebergAlgo
public IcebergAlgo(Sides side, decimal totalVolume, decimal displayVolume, decimal limitPrice)
icebergAlgo = IcebergAlgo(side, totalVolume, displayVolume, limitPrice)

Initializes a new instance of the IcebergAlgo.

side
Order side.
totalVolume
Total volume to execute.
displayVolume
How much of the total is shown at a time.
limitPrice
Price every slice rests at.

Propriedades

DisplayVolume
public decimal DisplayVolume { get; }
value = icebergAlgo.DisplayVolume

How much of the total is shown at a time.

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

Whether the algorithm has finished.

LimitPrice
public decimal LimitPrice { get; }
value = icebergAlgo.LimitPrice

Price every slice rests at.

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

Remaining volume to execute.

Side
public Sides Side { get; }
value = icebergAlgo.Side

Order side.

TotalVolume
public decimal TotalVolume { get; }
value = icebergAlgo.TotalVolume

Total volume to execute.

Métodos

Cancel
public void Cancel()
icebergAlgo.Cancel()

Cancel the current algo execution.

Dispose
public void Dispose()
icebergAlgo.Dispose()

Disposes of items in the pool that implement IDisposable.

GetNextAction
public PositionModifyAction GetNextAction()
result = icebergAlgo.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)
icebergAlgo.OnOrderCanceled(matchedVolume)

Notify that an order was canceled.

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

Notify that an order failed. Nothing traded.

OnOrderMatched
public void OnOrderMatched(decimal matchedVolume)
icebergAlgo.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)
icebergAlgo.UpdateMarketData(time, price, volume)

Update market data.

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

Update order book data.

depth
Order book.