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

Missing Data in one of the instruments

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

    Missing Data in one of the instruments

    Hi,

    I'm running a backtest on a multi-instrument strategy more then 100 names.
    My problem is that if one of the instrument has less data all the backtest is done only on the data period of the shortest instrument.
    I understand this is the design of NT but my problem is how can I identify which is the shorter data instrument so I can add more data to him without going over all the list one by one which is impractical.

    I hope I made my problem clear enough.

    Thanks in Advance,
    Roy

    #2
    Correct Roy, that OnBarUpdae() calling outcome would be expected in this context. I would look into working with Count (which works in BIP context) to highlight the instrument / series is having too less data.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Thanks Bertrand.

      If anybody will encounter same problem here is the code I use:
      Code:
      protected override void OnBarUpdate()
      {
             if (CurrentBar == 1) Print(Instruments[BarsInProgress].FullName + " " Count);
              ...
       
      }

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by algospoke, 04-17-2024, 06:40 PM
      6 responses
      49 views
      0 likes
      Last Post algospoke  
      Started by arvidvanstaey, Today, 02:19 PM
      4 responses
      11 views
      0 likes
      Last Post arvidvanstaey  
      Started by samish18, 04-17-2024, 08:57 AM
      16 responses
      61 views
      0 likes
      Last Post samish18  
      Started by jordanq2, Today, 03:10 PM
      2 responses
      9 views
      0 likes
      Last Post jordanq2  
      Started by traderqz, Today, 12:06 AM
      10 responses
      21 views
      0 likes
      Last Post traderqz  
      Working...
      X