Orders

View as Markdown

Definition

A collection of Order objects generated for the specified account

Property Value

An Collection of Order objects

Please keep in mind that orders placed when in State.Historical are not submitted live to an account.

Syntax

\<account\>.Orders

Examples

1private Account myAccount;
2
3protected override void OnStateChange()
4{
5 if (State == State.SetDefaults)
6 {
7 // Initialize myAccount
8 }
9}
10
11private void OnAccountItemUpdate(object sender, AccountItemEventArgs e)
12{
13 // Print the name and order action of each order processed on the account
14 foreach (Order order in myAccount.Orders)
15 {
16 Print(String.Format("Order placed: {0} - {1}", order.Name, order.OrderAction));
17 }
18}