Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IsAdoptAccountPositionAware

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

    IsAdoptAccountPositionAware

    The doc HERE says
    Only set to true if you have specifically programmed your strategy to be able to adopt account positions.
    Where is the documentation on how to program a strat to do that?
    I have a real time strategy:

    In OnStateChange:

    Code:
    Calculate = Calculate.OnPriceChange;
    In OnBarUpdate....
    Code:
             
    if (State != State.Realtime)
        return;
    I sometimes want my strat to hold a position over a weekend when I usually lose network connection to NT server and must reconnect. In this situation I need my strategy virtual position to assume the existing account position when I start the strategy.

    Is it enough to just put
    IsAdoptAccountPositionAware = true;
    in my OnStateChange and then start the strategy with the "Adopt Account Position" start option?

    The documentation on the Adopt Account Position HEREis confusing to me for 2 reasons.
    1. It talks a lot about orders. In my scenario there would be no orders to consider. Only an existing account position.
    2. The sentence:
    Any remaining active strategy orders that cannot be successfully paired will be submitted live and the strategy will then try to sync your Account Position to your Strategy Position.
    Isn't that backward? Shouldn't it read sync your Strategy Position to your Account Position? Existing wording suggests to me that it's going to change the Account Position to match the Strategy Position. I want the opposite and I think that's what this feature really is but not sure because of that sentence.

    #2
    Hello Brillo,

    Below is a link to the help guide on IsAdoptAccountPositionAware.
    http://ninjatrader.com/support/helpG...itionaware.htm

    This must be set to true for the Adopt account position option to use on the On-startup behavior.


    When Adopt account position is selected the strategy position will be changed to match the account position meaning the account position will be synced to the strategy position.

    When synchronize account is selected (with wait until flat or immediately submit) the account position will be changed to match the strategy position meaning the strategy position will be synced to the account position.

    Below is a link to a short video that demonstrates the On-startup behavior options.
    https://www.screencast.com/t/D2GRrGe5MfzJ


    Using Adopt account position would cause the strategy to start with the position of the account. This would not cause any protective orders to be submitted to protect that position so the strategy would not be resuming, it would only be adopting the account position.

    Below is a link to a thread that describes how to resume a strategy.
    http://ninjatrader.com/support/forum...332#post499332
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Renejm, Today, 06:17 AM
    0 responses
    3 views
    0 likes
    Last Post Renejm
    by Renejm
     
    Started by kazisl, Yesterday, 06:41 PM
    2 responses
    10 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by impactX, 05-04-2021, 01:07 AM
    1 response
    7 views
    0 likes
    Last Post Lancer
    by Lancer
     
    Started by op1031, Yesterday, 05:51 PM
    1 response
    8 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by aaadetos, 05-04-2021, 09:28 AM
    3 responses
    13 views
    0 likes
    Last Post NinjaTrader_Heath  
    Working...
    X