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

Mixing manual and automated trading, StartBehavior

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

    Mixing manual and automated trading, StartBehavior

    Hello,
    I need some details about the StartBehavior options in Ninjatrader.

    I would like my strategy to be and to stay active even if I use the Chart Trader to open or close positions manually. I have used these options below, but have found that when a position is opened manually, the exit criteria of the strategy are inactive and when a position is closed manually, the strategy is officially disabled.

    I have made these changes to the State.SetDefaults:

    StartBehavior = StartBehavior.AdoptAccountPosition;
    IsAdoptAccountPositionAware = true;

    What else can I do to obtain the desired behavior?

    #2
    Hello AnotherWorkingHomeless,

    Thanks for your post.

    The Start Behavior determines how the strategy should start. It does not guarantee that the strategy position will stay in sync with the account position.

    Submitting manual orders will desync the account from the strategy and using the Close button to close a strategy position will disable the strategy.

    You may consider adding buttons to the strategy so you can take manual actions and have those actions taken from the context of the strategy.

    I have linked an example that adds buttons for manual order submissions within the strategy.



    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

    I look forward to assisting.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by AttiM, 02-14-2024, 05:20 PM
    10 responses
    179 views
    0 likes
    Last Post jeronymite  
    Started by ghoul, Today, 06:02 PM
    0 responses
    7 views
    0 likes
    Last Post ghoul
    by ghoul
     
    Started by Barry Milan, Yesterday, 10:35 PM
    6 responses
    19 views
    0 likes
    Last Post Barry Milan  
    Started by DanielSanMartin, Yesterday, 02:37 PM
    2 responses
    13 views
    0 likes
    Last Post DanielSanMartin  
    Started by DJ888, 04-16-2024, 06:09 PM
    4 responses
    13 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Working...
    X