Table of Contents

Class QuotingEngine

Namespace
StockSharp.Algo.Strategies.Quoting
Assembly
StockSharp.Algo.dll

Pure functional engine that receives input data and returns action recommendations.

public class QuotingEngine
Inheritance
QuotingEngine
Inherited Members
Extension Methods

Constructors

QuotingEngine(IQuotingBehavior, Security, Portfolio, Sides, decimal, decimal, TimeSpan, IMarketDataProvider, DateTimeOffset)

Initializes a new instance of the QuotingEngine class.

public QuotingEngine(IQuotingBehavior behavior, Security security, Portfolio portfolio, Sides quotingSide, decimal quotingVolume, decimal maxOrderVolume, TimeSpan timeOut, IMarketDataProvider mdProvider, DateTimeOffset startTime)

Parameters

behavior IQuotingBehavior

The behavior defining the quoting logic.

security Security

Security to quote.

portfolio Portfolio

Portfolio for orders.

quotingSide Sides

The direction of quoting (Buy or Sell).

quotingVolume decimal

The total volume to be quoted.

maxOrderVolume decimal

Maximum volume of a single order.

timeOut TimeSpan

The time limit for quoting completion.

mdProvider IMarketDataProvider

Market data provider.

startTime DateTimeOffset

Start time for timeout calculation.

Methods

GetLeftVolume(decimal)

Calculate remaining volume to quote.

public decimal GetLeftVolume(decimal position)

Parameters

position decimal

Returns

decimal

IsTimeOut(DateTimeOffset)

Check if timeout has occurred.

public bool IsTimeOut(DateTimeOffset currentTime)

Parameters

currentTime DateTimeOffset

Returns

bool

ProcessCancellationResult(bool, QuotingInput)

Process the result of an order cancellation.

public QuotingAction ProcessCancellationResult(bool isSuccess, QuotingInput input)

Parameters

isSuccess bool

Whether cancellation was successful.

input QuotingInput

Current input state.

Returns

QuotingAction

Next recommended action.

ProcessOrderResult(bool, QuotingInput)

Process the result of an order registration.

public QuotingAction ProcessOrderResult(bool isSuccess, QuotingInput input)

Parameters

isSuccess bool

Whether registration was successful.

input QuotingInput

Current input state.

Returns

QuotingAction

Next recommended action.

ProcessQuoting(QuotingInput)

Process input data and return recommended action.

public QuotingAction ProcessQuoting(QuotingInput input)

Parameters

input QuotingInput

Input market data and state.

Returns

QuotingAction

Recommended action.

ProcessTrade(decimal, QuotingInput)

Process a trade execution.

public QuotingAction ProcessTrade(decimal tradeVolume, QuotingInput input)

Parameters

tradeVolume decimal

Volume of the executed trade.

input QuotingInput

Current input state.

Returns

QuotingAction

Next recommended action.