Click or drag to resize

New order creation

OrderWindow is the window for creating an order.

Main properties

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

GUI Order Window
C#
private void NewOrderClick(object sender, RoutedEventArgs e)
{
    var newOrder = new OrderWindow
    {
        Order = new Order { Security = SelectedSecurity },
        SecurityProvider = Trader,
        MarketDataProvider = Trader,
        Portfolios = new PortfolioDataSource(Trader),
    };

    if (newOrder.ShowModal(this))
        Trader.RegisterOrder(newOrder.Order);
}