Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi instrument..data unavailable

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

    Multi instrument..data unavailable

    I'm backtesting a list of 200 instruments in one script. When going 2 years back some of the instruments do not have data that far back and I get an error message that pops up for each of the particular instruments and the strategy will not process any trades. Is there anyway to put an if condition in the script to only process if the particular instrument has data available? Or any other work around? I don't want to have to take out certain instruments just because it has no data during the older portion of the backtest period.

    #2
    Delta007, would unfortunately expect this outcome since the script's OnBarUpdate() would only be called if all instruments have seen their BarsRequired fullfilled. That would be different to backtesting the list with single series strategies, so one instance per instrument.

    Comment


      #3
      There has to be some sort of work around for this. Couldn't you have some sort of IF condition to require that there be at least 1 bar available otherwise skip the instrument and move onto the next one?

      Comment


        #4
        Hi Delta007,

        I don't know what error you get but have a look at try...catch blocks. Maybe this can help you.

        good luck,

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        633 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        364 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        567 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X