ISlippageManagerState

StockSharp.Algo.Slippage

State storage for SlippageManager.

Properties

Slippage
public decimal Slippage { get; }
value = iSlippageManagerState.Slippage

Total accumulated slippage.

Methods

AddPlannedPrice
public void AddPlannedPrice(long transactionId, Sides side, decimal price)
iSlippageManagerState.AddPlannedPrice(transactionId, side, price)

Store planned execution price for an order.

transactionId
Order transaction ID.
side
Order side.
price
Planned price.
AddSlippage
public void AddSlippage(decimal amount)
iSlippageManagerState.AddSlippage(amount)

Add to accumulated slippage.

amount
Amount to add.
Clear
public void Clear()
iSlippageManagerState.Clear()

Clear all state.

RemovePlannedPrice
public void RemovePlannedPrice(long transactionId)
iSlippageManagerState.RemovePlannedPrice(transactionId)

Remove planned price for an order.

transactionId
Order transaction ID.
TryGetBestPrice
public bool TryGetBestPrice(SecurityId securityId, Sides side, decimal price)
result = iSlippageManagerState.TryGetBestPrice(securityId, side, price)

Try get best price for order side.

securityId
Security ID.
side
Order side (Buy returns ask, Sell returns bid).
price
Best price if found.

Returns: if price found and non-zero.

TryGetPlannedPrice
public bool TryGetPlannedPrice(long transactionId, Sides side, decimal price)
result = iSlippageManagerState.TryGetPlannedPrice(transactionId, side, price)

Try get planned price without removing.

transactionId
Order transaction ID.
side
Order side if found.
price
Planned price if found.

Returns: if found.

UpdateBestPrices
public void UpdateBestPrices(SecurityId securityId, decimal? bidPrice, decimal? askPrice, DateTime time)
iSlippageManagerState.UpdateBestPrices(securityId, bidPrice, askPrice, time)

Update best bid/ask prices for a security.

securityId
Security ID.
bidPrice
Best bid price (null to keep existing).
askPrice
Best ask price (null to keep existing).
time
Market data time. If both Level1 and order books are streamed, prices update only when time increases.