Click or drag to resize

Order book

GUI MarketDepthControl

MarketDepthControl - is a graphical component for displaying an order book. The component allows you to display quotes and own orders.

Main properties and methods

  • MaxDepth - the depth of an order book.

  • IsBidsOnTop - to display purchases on top.

  • UpdateFormat(Security) - to update the format for displaying prices and volumes using the instrument.

  • ProcessOrder(Order, Decimal, OrderStates) - to process an order.

  • UpdateDepth(MarketDepth) - to refresh an order book.

  • UpdateDepth(QuoteChangeMessage) - to refresh an order book with a message.

Below is the code snippet with its use. The code example is taken from Samples/BarChart/SampleBarChart.

<Window x:Class="SampleBarChart.QuotesWindow"
    Title="QuotesWindow" Height="600" Width="280">
  <xaml:MarketDepthControl x:Name="DepthCtrl" x:FieldModifier="public" />
private void ConnectorOnMarketDepthsChanged(IEnumerable<MarketDepth> depths)
    foreach (var depth in depths)
        var wnd = _quotesWindows.TryGetValue(depth.Security);

        if (wnd != null)