Click or drag to resize

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 OrderTypesMarket type of orders is not supported.

Prerequisites

Child strategies

Export of order book

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:

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

    C#
    // регистрируем ее
    base.RegisterOrder(order);

    to:

    C#
    var strategy = new MarketQuotingStrategy(order, new Unit());
    base.ChildStrategies.Add(strategy);
Next Steps