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 funk10101, Today, 12:02 AM
    0 responses
    1 view
    0 likes
    Last Post funk10101  
    Started by gravdigaz6, Yesterday, 11:40 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by MarianApalaghiei, Yesterday, 10:49 PM
    3 responses
    10 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by XXtrader, Yesterday, 11:30 PM
    0 responses
    4 views
    0 likes
    Last Post XXtrader  
    Started by love2code2trade, 04-17-2024, 01:45 PM
    4 responses
    28 views
    0 likes
    Last Post love2code2trade  
    Working...
    X