Implementing Your Own Order Entry GUI

The default order entry GUI works well with the included tutorials (RandomOrderMan and RandomRouting). However, if you want to trading other asset classes or use other value added services from your broker dealer, you may want to implement your own order entry GUI.

There are two types of order entry GUI, the new order entry and order modification entry. Each implementation should be assigned a name.

QWFIX Trader by default only implemented one class of new order entry GUI and order modification entry GUI, with the name of "Default".

There is also an implementation empty order entry GUI, which does nothing but prompting user to configure the Order Panel.

 

Order Entry GUI as User Control

Order entry GUI should be derived from the windows form Control class, as a user control.

 

Interfaces

Order entry GUI is required to implement certain interfaces. All required interfaces is defined in "IOrderPanel.cs".

Both new entry and modification entry GUI is required to implement IOrderPanel interface.

New order entry control is also required to implement INewOrderPanel interface.

Order modification control is also required to imeplement IOrderModPanel interface.

Each interface only has one method, the name of the methods are self explanatory.

 

Default Order Entry Controls

"DefaultNewOrderPanel.cs" and "DefaultOrderModPanel.cs" are implementations of the default new order entry and order modification entry controls included in QWFIX Trader source code.

It's easy for programmer to learn how the order entry GUI interacts with the rest of the system from those source codes.

 

Integrating Your Own Order Entry Controls

The code snippet below demonstrated the registration of built-in order controls in "OrderControl.cs".

Integrating your own order entry control is simple:

  1. Create a user control and implement the required interfaces as mentioned above in "Interfaces" paragraph.
  2. Create an instance of the control in OrderControl class.
  3. Give the control a unique name and regiater it by calling _RegisterNewOrderPanel or _RegisterOrderModPanel, depending on whether it's new order entry or modification entry.

CopyRegistering Default Order Entry Controls
// Order entry control instances
private DefaultNewOrderPanel _ordPanelNewDefault = new DefaultNewOrderPanel();
private DefaultOrderModPanel _ordPanelModDefault = new DefaultOrderModPanel();
private EmptyOrderPanel _ordPanelNewEmpty = new EmptyOrderPanel();
private EmptyOrderPanel _ordPanelModEmpty = new EmptyOrderPanel();
// Order entry control names
private const string OrderPanelNameDefault = "Default";
private const string OrderPanelNameEmpty = "NA";

public OrderControl()
{
    InitializeComponent();
    _RegisterNewOrderPanel(OrderPanelNameDefault, _ordPanelNewDefault);
    _RegisterNewOrderPanel(OrderPanelNameEmpty, _ordPanelNewEmpty);
    _RegisterOrderModPanel(OrderPanelNameDefault, _ordPanelModDefault);
    _RegisterOrderModPanel(OrderPanelNameEmpty, _ordPanelModEmpty);
}

 

Using Your Customized Order Entry GUI

In QWFIX Trader, use main menu "Tools" -> "Order Panel Settings" to associate your own controls to specified FIX sessions. Enjoy trading!