OnOrderUpdate()

View as Markdown

Definition

Called every time an order changes state. An order will change state when a change in order quantity, price or state (e.g. working to filled) occurs.

The OnOrderUpdate() method is called on ALL order updates (e.g., any account and instrument combination) and NOT just the specific items which are selected in the SuperDOM.

Method Return Value

This method does not return a value.

Syntax

protected override void OnOrderUpdate(OrderEventArgs orderUpdate)

Method Parameters

  • Parameter
  • Description

orderUpdate

An OrderEventArgs representing the change in order state

Examples

1protected override void OnOrderUpdate(OrderEventArgs orderUpdate)
2{
3 // Do not take action if the order update does not come from the selected SuperDOM instrument/account
4 if (orderUpdate.Order.Instrument != SuperDom.Instrument || orderUpdate.Order.Account != SuperDom.Account)
5 return;
6
7 // Do something
8}