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
behavior
IQuotingBehaviorThe behavior defining the quoting logic.
security
Securityportfolio
PortfolioquotingSide
SidesThe direction of quoting (Buy or Sell).
quotingVolume
decimalThe total volume to be quoted.
maxOrderVolume
decimalMaximum volume of a single order. If the total volume of
quotingVolume
is greater than this value, the processor will split the quoting into multiple orders.timeOut
TimeSpanThe time limit during which the quoting should be fulfilled. If the total volume of
quotingVolume
will not be fulfilled by this time, the strategy will stop operating.subProvider
ISubscriptionProvidercontainer
IMarketRuleContainertransProvider
ITransactionProvidertimeProvider
ITimeProvidermdProvider
IMarketDataProviderisAllowed
Func<StrategyTradingModes, bool>Is the strategy allowed to trade.
useBidAsk
boolTo 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.
useTicks
boolTo 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