I need some clarification on the Strategy Start behavior. I have the following set in my Strategy.
protected override void OnStateChange()
{
if (State == State.SetDefaults)
{
StartBehavior = StartBehavior.AdoptAccountPosition;
IsAdoptAccountPositionAware = true;
}
}
Now after the strategy has opened a position, if I disconnect the connection and reconnect it back and try to enable the strategy, I get the following message:
7/16/2018 22:04:41 Default 'Ninja8HACEJ' could not be enabled because the ‘Start behavior’ parameter 'Adopt account position' requires that there are no working orders on this strategy's instrument(s) in '401308720'. Please cancel any working orders on the same account-instrument combo(s) first to be able to enable your strategy.
Why isn't the strategy able to adopt the Account position?
Why does the Adopt Account position need 'no working orders' to enable strategy?
What would be the purpose of setting the Start behavior to Adopt Account position if the strategy cannot be enabled if there is an existing open position?
Comment