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 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