Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Changing onbarclose after stratetgy start

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

    Changing onbarclose after stratetgy start

    Can you change on onbarclose midstream on a strategy? I need to see the first few ticks to establish some initialization code then I would like to change it back to OnBarClose=false to save resources. I didn't know if once established if you can change it or not or if it would be ignored.

    #2
    Hello ct,

    You can change strategy parameters settings of automated strategies in NinjaTrader 7. However you will need to disable the strategy first - you cannot change strategy parameters while the strategy is running.

    Please note that setting 'Calculate on bar close' to False will take more resources than setting it to True.

    Comment


      #3
      Jason

      so from within the strategy I cannot change the setting of on barclose?

      Comment


        #4
        You can change 'Calculate on bar close' within the strategy code as well.

        Comment


          #5
          Jason

          Will the strategy will be re-initialized when I do this? Or simply not receive the next tick until on barclose?

          Cliff

          Comment


            #6
            You will need to compile your strategy after making the change in the strategy code and the change will be effective.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by CaptainJack, 05-29-2026, 05:09 AM
            0 responses
            53 views
            0 likes
            Last Post CaptainJack  
            Started by CaptainJack, 05-29-2026, 12:02 AM
            0 responses
            34 views
            0 likes
            Last Post CaptainJack  
            Started by charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            100 views
            0 likes
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            181 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            170 views
            0 likes
            Last Post CarlTrading  
            Working...
            X