Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Multi timeframe strategy unable to backtest beyond a day
Collapse
X
-
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 ?Tags: None
-
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.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
65 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
139 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
75 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
50 views
0 likes
|
Last Post
|

Comment