I wanted to report an issue that I found.
When you Optimize a strategy using an indicator with the Draw object, the Optimization/Strat Analyzer will consume all physical memory until the system slows to a crawl.
I've attached a Test Script and a test indicator so you can see the problem. The script was built off the Sample MA Crossover with the only additions being the DM and DMArrow references. The DM Arrow indicator is simply the DM indicator with the Draw Arrow lines added.
Steps to duplicate:
1. In your test script, make sure the 2 DMArrow lines are commented out.
2. For the Optimization settings, see attached graphic for what I used. I just wanted something large enough so you can see the memory usage within a few minutes.
3. Start optimization. Open Task Manager and monitor the NJT exe memory usage. You can see that NJT will continually 'cleanup' its memory usage after a few minutes of running.
4. Once you see the memory cleanup process happening, hit Abort.
5. Edit the TestScript strategy and comment out the DM indicator and remove the comments from the 2 DMArrows lines. Compile.
6. Run the optimization again and watch the resource utilization and notice that it doesn't cleanup. It just continues until you hit your max physical memory.
7. Hit Abort when you're done looking.
PS. While running this test, after you hit Abort before the test concludes, you may see the same error I reported a while back:
Unhandled exception: Value does not fall within the expected range.
This seems to occur when you Abort a large Optimization test. The error will keep occurring until you reboot your desktop. So, this is an additional error outside of the memory leak.
Comment