Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Tick Replay limit strategy to minimal about of bars of data
Collapse
X
-
Tick Replay limit strategy to minimal about of bars of data
I have a strategy using an indicator that needs to run in tick replay, otherwise I get Object referenced not found. But the strategy takes a long while to load before it actually is enabled. In the dataloaded section is there a way to limit the number of bars of data so that it is much quicker.Tags: None
-
Hello set2win,
Object referenced not found would mean that an object was null, that generally shouldn't be related to tick replay. If you disable tick replay you could debug the script to see what part is having a null error.
There is otherwise not a way to limit the amount of data when using tick replay, it is based on the data series settings. If you select 100 days of data its going to need to have tick data for 100 days and process that data to accommodate the tick replay.
I would suggest trying to disable it and then comment out various parts of your code to find what part is generating an error. If you can locate the part having the error and you are not sure why that causes an error when tick replay is off we could take a closer look at that specific part of the script to get a better idea on a solution.
-
I know exactly what causes the error. The indicator being loaded. it sitting there waiting for the tick data to load, its overwhelmed, I tried limiting the number of bars when selecting the data series it helps. Its just limitation I guess of Ninjatrader and the computer. Thanks for the non answer answer. Once the data completes the object is no longer null. I guess I was hoping there was a way to efficiently limit the strategy from seeking that much data. Like go get 100 bars of data not a days worth on the strategy end. What about this version of AddDataSeries
AddDataSeries(string instrumentName, BarsPeriod barsPeriod, int barsToLoad, string tradingHoursName, bool? isResetOnNewTradingDay)??
Last edited by set2win; 10-24-2022, 04:36 PM.
Comment
-
Hello set2win,
What specific line in the indicator is throwing the error? Again the error is specific, its a C# error meaning an object being used was null when it was used. That can be corrected by using the correct code to check for null or adjusting how the code throwing the error is used. You would need to debug the indicator if the indicator is throwing an error in a certain use case.
If you enable TickReplay that is for all series which would mean your primary still needs to process all bars used so correcting the error is really the only actual solution if you want to avoid the slow loading.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
56 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
132 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
73 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
49 views
0 likes
|
Last Post
|

Comment