IsAdoptAccountPositionAware

View as Markdown

Definition

Determines if the strategy is programmed in a manner capable of handling real-world account positions. Once set to true, your strategy’s Start behavior options will include an additional parameter named Adopt account position which can be set at run-time. Only set to true if you have specifically programmed your strategy to be able to adopt account positions.

Property Value

This property returns true if the strategy can adopt account positions; otherwise, false. Default is set to false.

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

Syntax

IsAdoptAccountPositionAware

Examples

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