Click or drag to resize

New order creation

OrderWindow is the window for creating an order.

GUI Order Window

Main properties

Below is the code snippet with its use. The code example is taken from Samples/InteractiveBrokers/SampleIB.

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