I have written a Strategy in NT8, but am experience stability issues due to excessive memory use. In order to get around that, I'd like some help understanding the architecture NT8 uses when it comes to data streams, as well as somebody perhaps pointing out to me what's the recommended approach to handle a large number of data series with medium amounts of historical data.
First of all, is there an undocumented option (or a workaround) to set MaximumBarsLookBack to something other than 256 or Infinite? My system requires about 2000 bars lookback to do some calculations, so don't really need infinite, but 256 does not work either.
My trading system uses about 60 distinct data streams (stocks added via AddDataSeries in my code), if I run a few instances of the system on different stocks (but the same stock data streams are used internally between all), I end up with 70-80 distinct data streams in total. My memory consumption goes to over 11 GB in just a few days. It usually grows really high on the weekend when there is no incoming data -- could this be an NT8 bug?
11 GB sounds like too much as even several years worth of data for all the stocks should be under 2 GB.
Does NT8 automatically recognize that different strategies are requesting the same data and instead of instantiating multiple copies it uses a single one?
Is there a way to force NT8 to truncate the data series to a value (other than 256)?
Is this expected behavior or is there something that I've missed out in my own code that's resulting in this massive memory leak?
Any suggestions and thoughts welcome!
Thanks!
Comment