IsUnmanaged

View as Markdown

Definition

Determines if the strategy will be using Unmanaged order methods.

Unmanaged order methods and Managed order methods cannot be used interchangeably. When IsUnmanaged is set to true, calling managed order methods such as EnterLong(), SetStopLoss(), etc., will generate an error which will be displayed on the Log tab of the Control Center.

Property Value

This property returns true if the strategy will use Unmanaged order methods; otherwise, false. Default is set to false.

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

Syntax

IsUnmanaged

Examples

1protected override void OnStateChange()
2{
3 if (State == State.SetDefaults)
4 {
5 // Use Unmanaged order methods
6 IsUnmanaged = true;
7 }
8}