Possible?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
'Unload' a data series
Collapse
X
-
'Unload' a data series
For performance reasons, I am interested to know if it is possible to 'unload' a data series. For instance, without tick reply, load tick data, get the data points you need from historical data, then dispose of that data series and just add to your data point via OnMarketData, without adding to the data series. Presumably this would be less resource hungry than using a permanent tick series?
Possible?Tags: None
-
Hi pjsmith, thanks for your post.
It's not possible to unload a series dynamically because the series is added in OnStateChanged. While BarsInProgress == 1 (assuming the 1 tick series is the only added series), you can check for if(State == State.Historical) and process the 1 tick series while that is true, then when it is false, return; This will reduce the overhead as much as possible.
Kind regards.
-
Thank you. Could I ask you one more question, in the interests of performance optimization? 1 indicator that calculates an EMA from the base formula for 4 ema's with different periods (just as the supplied EMA does), or 4 x the EMA indicator. Any difference at all in resource usage? Worth combining 4 into 1, if I use them on multiple charts (only on barupdate, but if there is anything to be gained, I will do it)
Thanks.
Comment
-
Hi pjsmith, thanks for your reply.
If 4 different EMA's are needed for the calculation then there is a measurable amount of minimum performance needed for that. There's not really any more optimizations you could do if you are using the EMA's in an indicator. Unless you can do the calculation with less EMA's that would be the only way to improve the performance, but you should be fine.
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
574 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
332 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment