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:	185
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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      47 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      23 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      33 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      51 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      42 views
      0 likes
      Last Post CarlTrading  
      Working...
      X