Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

# of bars are different in multi time frame strategy

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

    # of bars are different in multi time frame strategy

    Hi NT experts,


    I have an issue of having different bars loaded when using multiple time frames.


    When using 1 min bar only, the loaded bar when starting a strategy can be well beyond 10,000.


    When adding 1 min bar as secondary to 1 sec (primary), both of same instrument, the max loaded bar for 1 min series is 4067, a magic number.


    Under option tab, the setting for min bar series to load is 30 days of historical data, which should have allow more than 40,000 bars to be loaded.


    I am using Interactive Brokers and it has restriction on max bars to be retried through API. However, these restrictions should give same number of bars for the same time frame of the same instrument, regardless of other data series in the strategy. At least that is my assumption.


    Any suggestions as to what is going on?

    Regards,

    #2
    Please clarify how you are counting the bars. Thank you.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      Please clarify how you are counting the bars. Thank you.
      Using CurrentBar.

      With 1 min data series only, it is just CurrentBar.

      When adding it to a sec data series as primary, i count this way:
      if (BarsInProgress ==0)
      { //Print BarsInProgress and CurrentBar};
      if (BarsInProgess ==1)
      {// Print BarsInProgress and CurrentBar};

      In both cases, the CurrentBar will start with min bar required (20 in this case) and all the way up to thousands. The loaded bars are counted as the number of bars keep printing with each coming tick but no longer increase within the current timestamp. Of course it will increase by 1 when the time stamp advaces by 1.

      Comment


        #4
        Thanks for clarifying binwang2, IB would also have a general data restriction for how much data you could access in a certain time period. I would suggest you try this in the following manner -

        1) Disconnect NT from IB

        2) Clear out all unneeded TWS tickers, NT charts & Market Analyzer windows

        3) Wait about 10 min for your data status to change with IB

        4) Reconnect fresh and retry downloading the data - same outcome?

        5) If yes, any log tab errors to report?

        Thanks
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by algospoke, Yesterday, 06:40 PM
        2 responses
        23 views
        0 likes
        Last Post algospoke  
        Started by ghoul, Today, 06:02 PM
        3 responses
        14 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        45 views
        0 likes
        Last Post jeronymite  
        Started by Barry Milan, Yesterday, 10:35 PM
        7 responses
        22 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by AttiM, 02-14-2024, 05:20 PM
        10 responses
        181 views
        0 likes
        Last Post jeronymite  
        Working...
        X