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 helpwanted, Today, 03:06 AM
        1 response
        14 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        11 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        6 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        244 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        387 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X