Table of Contents

Quoting

Quoting algorithm allows you to control the position of the registered orders in the order book. The necessary of such functionality occurs when you need to quickly open and close positions at favorable prices. Also, due to the quick monitoring of the order book, the quoting allows to realize scalping tools for over small time frames.

Also, the quoting can emulate market orders on a exchanges, where the OrderTypes.Market type of orders is not supported.

Prerequisites

Child strategies

To implement the quoting the S# includes the QuotingStrategy class. This is the base abstract class for all derivative algorithms:

Quoting adding to the SampleSMA

  1. It is necessary to enable the export of the order book before starting work, so the moving average algorithm described in the iteration model, section begin to work in association with the strategy:

    if (!_isAaplOrderBookStarted)
    {
     _connector.SubscribeMarketDepth(aapl);
     _isAaplOrderBookStarted = true;	
    }
    
  2. It is necessary to replace the code in the SmaStrategy class from:

    base.RegisterOrder(order);
    

    to:

    var strategy = new MarketQuotingStrategy(direction, volume);
    ChildStrategies.Add(strategy);
    

Next Steps

Take-profit and stop-loss