Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Restarting Strategy, Starting Behavior

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

    Restarting Strategy, Starting Behavior

    After reading through the 4 strategy start behaviors I am still confused if any of them will work for my intended purpose or if I need to add new code to my strategy.

    If you look at my attachment for reference, I want the ability to freely turn on and off my strategy, and when I turn my strategy back on I would like it to place orders as if there were no historical bars to consider.

    For example I would like to turn off my strategy at 10 AM (first blue line) and then turn it back on at 11AM (second blue line). When I turn on my strategy at 11AM I would like it to immediately place new entries (Green Diamonds) and avoid waiting to be flat or trying to duplicate the entries that would have been made (Blue Diamonds) if the strategy had been running the whole time.

    Is this achieved with "immediately submit synchronize account?"

    Thank you

    Click image for larger version

Name:	Question.png
Views:	192
Size:	16.9 KB
ID:	1141138

    #2
    Hello mlprice12,

    Thanks for your post.

    Here is a link to a post by my colleague Chelsea where he details various options that may help your understanding: https://ninjatrader.com/support/foru...ion#post811541

    If you are looking for a code solution, what he advises is to test for State.Historical and return.

    If you are using the Strategy Builder, in each entry set you would need to add the condition of Misc>Current State, equals, Misc>State.Realtime (to create a "true" condition for the entry sets, meaning all historical bars are ignored)

    Please note that using either of these means there will be no historical trades (which means you cannot test in the strategy analyzer) and that the strategy will trade as soon as your entry conditions are true.

    Comment


      #3
      Thanks Paul,

      I will use your link as guidance and post any questions that follow.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      67 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      150 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      99 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      286 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X