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 Mindset, 04-21-2026, 06:46 AM
|
0 responses
89 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
135 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
119 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
69 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment