Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Using AdoptAccountPosition

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

    Using AdoptAccountPosition

    I created a multi-Instrument strategy and I don't need ninjatrader do any historical processing on a strategy. I just need it adopt the current account positions and continue.


    I set
    IsAdoptAccountPositionAware = true;
    StartBehavior = StartBehavior.AdoptAccountPosition;

    I use a simulator account. Every time I restart the strategy all positions reset to zero. What can I do to prevent this?
    Last edited by ManTrader; 07-09-2019, 01:25 PM.

    #2
    Hello ManTrader,

    Thank you for your post.

    To clarify, the behavior is that you have a manually placed order, and despite being set to IsAdoptAccountPositionAware = true and StartBehavior = StartBehavior.AdoptAccountPosition, all orders are being closed instead of adopted as the strategy position, is that correct?

    Could you explain further how you are checking for the account position when the strategy is enabled? If you have a reduced version of your strategy (you can remove all code not necessary to reproduce the behavior) that would be very helpful.

    Thanks in advance; I look forward to assisting you further.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Sorry, I was testing with Playback account! Simulate account is working correctly. You can remove this issue.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by warreng86, 11-10-2020, 02:04 PM
      4 responses
      1,354 views
      0 likes
      Last Post mathewlo  
      Started by Perr0Grande, Today, 08:16 PM
      0 responses
      2 views
      0 likes
      Last Post Perr0Grande  
      Started by elderan, Today, 08:03 PM
      0 responses
      5 views
      0 likes
      Last Post elderan
      by elderan
       
      Started by algospoke, Today, 06:40 PM
      0 responses
      10 views
      0 likes
      Last Post algospoke  
      Started by maybeimnotrader, Today, 05:46 PM
      0 responses
      12 views
      0 likes
      Last Post maybeimnotrader  
      Working...
      X