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

private Account myAccount;
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
// Initialize myAccount
}
}
private void OnAccountItemUpdate(object sender, AccountItemEventArgs e)
{
// Print the name and order action of each order processed on the account
foreach (Order order in myAccount.Orders)
{
Print(String.Format("Order placed: {0} - {1}", order.Name, order.OrderAction));
}
}