Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy not observing session template

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

    Strategy not observing session template

    Sometimes my strategy does not work outside of RTH normal trading hours, even though the strategy session template specifies extended hours. This morning before 9:30am EST, even though the SPY was being actively traded and the SPY chart was being updated, the OnBarUpdate() method in the strategy was not being called at all, so the strategy was not doing anything. Simple print statements in OnBarUpdate() where not being printed. The moment 9:30am EST came, the strategy started working. This does not happen all the time, it seems that I see this more on Monday mornings, but I haven't really collected any stats on when this happens. What is going on?

    #2
    Hello,

    So that I may try and replicate the issue could you attach the strategy, or a simplified version of it?

    Additionally, what session template are you using, and what time frame are your bars set to?

    I look forward to assisting you further.
    LanceNinjaTrader Customer Service

    Comment


      #3
      It can be tested with a default strategy with just a print statement in the OnBarUpdate() method. I am using range bars. When it's not working, none of the session templates work, even 'Default 24/7'. The issue is that this only happens occasionally. But I seem to notice it mostly on Monday mornings pre-market. Are there any steps you want me to take or data to collect the next time the situation occurs?

      Comment


        #4
        Hello,

        Is Calculate On Bar Close set to true? (this can be found within the Strategies Panel's General Section)

        This will cause the OnBarUpdate() to only be called after each bar closes. If the market isn't forming a new range bar it will not be triggered.



        I look forward to assisting you further.
        LanceNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Lance View Post
          Hello,

          Is Calculate On Bar Close set to true? (this can be found within the Strategies Panel's General Section)

          This will cause the OnBarUpdate() to only be called after each bar closes. If the market isn't forming a new range bar it will not be triggered.



          I look forward to assisting you further.
          I have CalculateOnBarClose = false; in the Initialize() method. I also verify this in the parameters window.

          Comment


            #6
            Hello,


            Please send me your log and trace files for today so that I may look into what occurred.
            You can do this by going to the Control Center-> Help-> Mail to Support.
            Please reference the following ticket number in the body of the email:739683


            I look forward to assisting you further.
            LanceNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            656 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            371 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            109 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            574 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            579 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X