IsUnmanaged

<< Click to Display Table of Contents >>

Navigation:  NinjaScript > Language Reference > Strategy > Order Methods > Unmanaged Approach >

IsUnmanaged

Previous page Return to chapter overview Next page

Definition

Determines if the strategy will be using Unmanaged order methods.

 

Note: 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 bet set from the OnStateChange() method during State.SetDefaults or State.Configure

 

 

Syntax

IsUnmanaged

 

 

Examples

ns

protected override void OnStateChange()
{
    if (State == State.SetDefaults)
    {
        // Use Unmanaged order methods
        IsUnmanaged = true;
    }
}