Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bars In Progress error

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

    Bars In Progress error

    I am loading 81 symbols via the Add for one of my strategies. Yesterday everything worked fine. Today my system is only trading about 5 of them. I did a print statement to track the barsinprogress and only 5 of them are spitting out. I haven't adjusted the code any from yesterday that was working with all 81.

    I cleared the cache.

    What else can I do?

    #2
    Hello vjsworld,

    Could you give us a snippet of your code on how you are using the "Add" to load the different instruments into your Automated Strategy?

    Also, did you shutdown NinjaTrader before removing the cache data?

    Happy to be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      reply

      yes i did restart during the clearing of cache.

      here is my add:

      j = 1;
      foreach (var pair in myBarsInProgress)
      {
      Add(pair.Key, PeriodType.Minute, 1);
      Instr[1, j] = j;
      j = j + 1;
      Print(pair.Key);
      }

      Comment


        #4
        Hello vjsworld,

        Note that dynamically using the Add() method is not supported.

        With that said, are you checking "pair" to make sure that it has all of the 81 instruments that you are trying to Add() inside of Initialize?
        JCNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        67 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        61 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X