StartBehavior

View as Markdown

Definition

Sets the start behavior of the strategy. See Syncing Account Positions for more information.

In order to use AdoptAccountPosition you will need to first set IsAdoptAccountPositionAware to true. Please be sure that your strategy is specifically programmed in a manner that can accommodate account positions before using this mode.

Property Value

An enum value that determines how the strategy behaves; Default value is set to StartBehavior.WaitUntilFlat. Possible values are:

  • StartBehavior.AdoptAccountPosition
  • StartBehavior.ImmediatelySubmit
  • StartBehavior.ImmediatelySubmitSynchronizeAccount
  • StartBehavior.WaitUntilFlat
  • StartBehavior.WaitUntilFlatSynchronizeAccount

Syntax

StartBehavior

Examples

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