• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ninja Trader 8 Start behavior - Adapt Account Position

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Ninja Trader 8 Start behavior - Adapt Account Position

    Hello:

    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?

    #2
    Hello ajsdnyyrr1234DDf,
    Thanks for your post.

    This is noted in the help guide as a limitation of using the 'Adopt account position' start behavior. I believe this is because of order handling rules and how NinjaTrader handles strategy position versus your account position.

    The strategy was not able to adopt the account position because it does not see the orders as its own. A previously generated order is considered to match an active strategy order when the order action, order type, quantity, limit price, and stop price are exactly identical.

    There are other considerations to be made as well when using this setting listed in the help guide documentation.

    Help Guide- Adopt account position

    Strategy Position vs. Account Position
    JoshNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by uiwislth, Yesterday, 11:25 PM
    0 responses
    3 views
    0 likes
    Last Post uiwislth  
    Started by Steve L, Yesterday, 10:04 PM
    0 responses
    2 views
    0 likes
    Last Post Steve L
    by Steve L
     
    Started by marianfed, Yesterday, 09:47 PM
    0 responses
    3 views
    0 likes
    Last Post marianfed  
    Started by hir04068, Yesterday, 09:29 PM
    0 responses
    2 views
    0 likes
    Last Post hir04068  
    Started by iq200, 03-11-2018, 07:49 PM
    24 responses
    1,012 views
    0 likes
    Last Post mrlucky1x  
    Working...
    X