Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

20 Min. bars still applied to current day's market data even Days to load is 2

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

    20 Min. bars still applied to current day's market data even Days to load is 2

    Hi,


    I setup a strategy as attached image for automatic intraday trading at Monday, July 18th, 2011. Data bar type is 5 minutes. Days to load is 2 and Min. bars required is 20.


    The time zone I am living is UTC-07:00 Mountain Time, so the US stock market opens at 7:30AM of my local time. However, the first OnBarUpdate() of Monday was triggered at 9:15AM which was 20 data bars after market open.


    Since I already setup Days to load to 2, I expected this 20 Min. bars should be applied to the very beginning of the loaded previous day's data and this Monday's OnBarUpdate() should be triggered right after market open instead of 20 bars later.


    Why this 20 Min. bars still applied to this Monday's market data?

    Thanks,
    weiwei
    Attached Files

    #2
    Hello weiwei,

    Days to load tells the strategy how many previous days of data to load.

    Minimum bars required tells it to wait so many bars before processing strategy logic.

    Since I already setup Days to load to 2, I expected this 20 Min. bars should be applied to the very beginning of the loaded previous day's data and this Monday's OnBarUpdate() should be triggered right after market open instead of 20 bars later.
    This assumption is not correct. Min bars required simply looks at the available data, and doesn't process strategy logic until the number of bars has been satisfied. If you want it to start right away, set minimum bars required = 0.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Hi Ryan,

      The OnBarUpdate() was triggered right away today's morning for the same 20 Min. bars setting. I noticed this kind "issue" usually happens at Monday's morning. Can I understand the reason is because, for Monday, the previous 2 days are Saturday and Sunday, which do not have market data. So 20 Min. bars setting applies on Monday open. Whilst for other weekdays like Tuesday, 20 Min. bars can apply to previous day's market data.

      Thanks,
      weiwei

      Comment


        #4
        Yes, that's a good observation and likely explains why you did not see what you were expecting. The days to load setting is calendar days, not trading days.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Thanks,
          weiwei

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          648 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          369 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          108 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          572 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          573 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X