Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

market data issue using simulator

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

    market data issue using simulator

    Hello support,

    I'm using the NJ simulator to simulate market data. I have two bar data 1 min and 10 min bars created in my strategy.

    When I, say, have about 100 minutes bars generated by simulator, then I start the strategy, the historical 1 min bar was played first til current time, then NJ plays 10 min bar til current time, meaning that 1 min bar and 10 min bar are not happening chronically. After that the 10 min bar is generated every 10 minutes.

    Is there a way, when play historical data, the 10 min bar is generated every 10 minutes?

    Thanks
    Brent

    #2
    I think I follow - What is CalculateOnBarClose set to?

    If true, change to false.
    If false - I have no idea your problem.

    Comment


      #3
      sledge,

      CalculateOnBarClose was set to True, changed it to False does not solve my issue.

      To be more clearer,

      My issue is.

      1. Market data is generated by simulator
      2. suppose NJ is running since 9:00 AM, it created 1 min bar from 9:00 AM to 11:00AM
      3. suppose current time is 11:00AM
      4. have two bar data series, 1 min bar and 10 min bar in the strategy
      5. min bar required is set to 1

      when I start the strategy at 11:00,
      The OnBarUpdate is called 120 times for 1 min bar from 9:00 to 11:00, then it's called 12 times for 10 min bar from 9:10 to 11:00.

      My understanding is that OnBarUpdate should be called 10 times for 1 min bar followed by 1 OnBarUpdate call for 10 min bar, and so on.

      This essentially makes me cannot use 10 min bar.

      Thanks

      Comment


        #4
        Brent_,

        This is how bars are built in the charts. The 9:10 bar will include information from 9:00 to 9:09:59

        Additionally, you said yourself that you are getting 12 calls for the 10 min chart. 120 min / 10 min = 12 calls, 6 per hour.

        You will also have your 1 min chart start its counting at 9:01 if the opening is 9:00.
        http://www.ninjatrader.com/support/h..._are_built.htm

        Let me know if I can be of further assistance.
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        64 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        41 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        22 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        25 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        52 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X