Class QuotingProcessor
- Namespace
- StockSharp.Algo.Strategies.Quoting
- Assembly
- StockSharp.Algo.dll
A passive quoting processor that analyzes market data and order state to recommend actions.
public class QuotingProcessor : BaseLogReceiver, IPersistable, ILogReceiver, ILogSource, IDisposable
- Inheritance
-
QuotingProcessor
- Implements
- Inherited Members
- Extension Methods
Constructors
QuotingProcessor(IQuotingBehavior, Security, Portfolio, Sides, decimal, decimal, TimeSpan, ISubscriptionProvider, IMarketRuleContainer, ITransactionProvider, ITimeProvider, IMarketDataProvider, Func<StrategyTradingModes, bool>, bool, bool)
Initializes a new instance of the QuotingProcessor class.
public QuotingProcessor(IQuotingBehavior behavior, Security security, Portfolio portfolio, Sides quotingSide, decimal quotingVolume, decimal maxOrderVolume, TimeSpan timeOut, ISubscriptionProvider subProvider, IMarketRuleContainer container, ITransactionProvider transProvider, ITimeProvider timeProvider, IMarketDataProvider mdProvider, Func<StrategyTradingModes, bool> isAllowed, bool useBidAsk, bool useTicks)
Parameters
behaviorIQuotingBehaviorThe behavior defining the quoting logic.
securitySecurityportfolioPortfolioquotingSideSidesThe direction of quoting (Buy or Sell).
quotingVolumedecimalThe total volume to be quoted.
maxOrderVolumedecimalMaximum volume of a single order. If the total volume of
quotingVolumeis greater than this value, the processor will split the quoting into multiple orders.timeOutTimeSpanThe time limit during which the quoting should be fulfilled. If the total volume of
quotingVolumewill not be fulfilled by this time, the strategy will stop operating.subProviderISubscriptionProvidercontainerIMarketRuleContainertransProviderITransactionProvidertimeProviderITimeProvidermdProviderIMarketDataProviderisAllowedFunc<StrategyTradingModes, bool>Is the strategy allowed to trade.
useBidAskboolTo use the best bid and ask prices from the order book. If the information in the order book is missed, the processor will not recommend any actions.
useTicksboolTo use the last trade price, if the information in the order book is missed.
Properties
LeftVolume
Left volume.
public decimal LeftVolume { get; }
Property Value
Methods
DisposeManaged()
Disposes the managed resources. Override this method to add custom clean up of managed resources.
protected override void DisposeManaged()
Start()
Start the processor.
public void Start()
Stop()
Stop the processor.
public void Stop()
Events
Finished
Occurs when the processor is finished. The argument indicates whether the quoting was successful or by timeout.
public event Action<bool> Finished
Event Type
OrderFailed
Occurs when an order fails to be registered.
public event Action<OrderFail> OrderFailed
Event Type
OrderRegistered
Occurs when an order is registered.
public event Action<Order> OrderRegistered
Event Type
OwnTrade
Occurs when an own trade is received.
public event Action<MyTrade> OwnTrade