Click or drag to resize

Order book

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

Main properties and methods

Below is the appearance of the component, as well as code snippets with its use. The code example is taken from Samples/BarChart/SampleBarChart.

GUI Market Depth Control
XAML
<Window x:Class="SampleBarChart.QuotesWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:xaml="http://schemas.stocksharp.com/xaml"
    Title="QuotesWindow" Height="600" Width="280">
  <xaml:MarketDepthControl x:Name="DepthCtrl" x:FieldModifier="public" />
</Window>
C#
private void TraderOnMarketDepthChanged(MarketDepth depth)
{
    var wnd = _quotesWindows.TryGetValue(depth.Security);

    if (wnd != null)
        wnd.DepthCtrl.UpdateDepth(depth);
}