DefaultQuantity

View as Markdown

Definition

An order size variable that can be set either programmatically or overridden via the Strategy that determines the quantity of an entry order.

Property Value

An int value represents the number of contracts or shares to enter a position with. Default value is 1.

This property should ONLY be set from the OnStateChange() method during State.SetDefaults or State.Configure.

Syntax

DefaultQuantity

Examples

1protected override void OnStateChange()
2{
3 if (State == State.SetDefaults)
4 {
5 DefaultQuantity = 1;
6 }
7}