Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi timeframe strategy unable to backtest beyond a day

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

    Multi timeframe strategy unable to backtest beyond a day

    Hi, I've created a multi-timeframe strategy that I'm getting the "on bar 1381, object reference not set to an instance of an object. Besides the current time frame which is 1 min I also check for conditions on 6 other timeframes 2min, 3 min 10 min, 30, min 240 min and day. My question is in testing historical data what should I add to my strategy to retrieve data beyond the day ?

    #2
    Hello set2win,

    Your strategy should be able to test as far back as it has data for. As long as both series have data for more than a day that could be used.

    The error "object reference not set to an instance of an object" means something was null. Without more detail of the code you used I couldn't really provide any context on why you may be getting that error.

    A quick way to find the problem is to just comment out all of the OnBarUpdate logic, compile and run the strategy to make sure that doesn't happen. If the script has no error, uncomment a few lines and compile/test again until you find the error.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    65 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    139 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    75 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X