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.

GUI Market Depth Control

Main properties and methods

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

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);
}