I come through this text report a serious situation that is occurring with the NinjaTrader.
So far already lost over more than 40 days trying to find out what's going on with my systems I worked more than four months to develop and now are not adequate performance.
Well, I discovered that the code (either indicator or strategy) when inserting a function (indicator) when running the code the NinjaTrader gets lost and consumes absurdities memory values causing the system to crash, and even after complete the process memory remains full.
This problem occurs in both indicators as in the strategies, you will feel their effects depending on how often your code will call the functions can be the simplest MAX, MIN, WMA, SMA, etc. until custom indicators and complex strategies that uses in their code function calls. (take a look this exemple: http://ninjatrader.com/support/forum...ad.php?t=80443)
I'm really concerned because I'm trying over 40 days to resolve this and was thinking that the problem was my logic, I was surprised to find that the problem is not my code but the "indicators calls" that get lost.
Already tried all possible resources, and I report to you that nothing works, I tried: GC.Collection timer without timer and when I identify high memory numbers. I tried to sleep in one thread, re-wrote all dataseries in a intraday Lists with this thinking it would consume less memory, etc. I tried everything and nothing worked.
What I think is happening is that when the NinjaTrader calls an indicator within another indicator the Threads get lost. And as a result there is the absurd increase in memory.
I will relate below my performance tips and best practices I have learned in force after who knows how many thousands of lines of programming.
1 - Never call indicator in indicators and strategies;
2 - Do not make any difference using List to make a base in parallel;
3 - loops are very fast and efficient producers rather than the NT team says, "the problem of loops" is when they call functions that moment the system get lost. This can happen in backtests, optimization and complex strategies.
4 - GC.Collection only works on the system start, you can clear the memory that previously was lost because of Threads problems. Call it only once at the beginning of the code.
5 - use a lot "For" and "While" use loopings without fear they are fast and efficient.
6 - believe it or not the size of the bases no effect on performance if you not call any functions in the code. I use 5min with 1 year based on the screen with 60 indicators and loads the chart in 5s
7 - Trust your code, not ever-they are wrong.
I wrote this text as a warning to NinjaTrader that there is something very wrong and for your users (traders and developers) identify with my problems so that we can come together and require an solution to this problem that greatly affects the performance of NinjaTrader.
Thank you.
Comment