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:	180
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 argusthome, 03-08-2026, 10:06 AM
      0 responses
      111 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      60 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      38 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      43 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      79 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X