Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Dumping / Re-setting Data

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Dumping / Re-setting Data

    I often work with a fair amount of price data (years worth). This often maxes out the available memory. If I then change the "Time frame" on the "Strategy Analyzer" the platform hangs, causing me to exit the platform, then re-launch.

    So, is there a way to remove the price data that has been put into RAM (ie, dumping the data that's been loaded there) -- other than to exit the platform, then re-launch?

    #2
    Hello spottysallrite,

    There isn't any supported way to clear the memory.

    Is this just a backtest or is this an optimization?

    Does this script use the SystemPerformance collection within the code?

    Is IncludeTradeHistoryInBacktest set to true or false?


    Does the script have a large amount inputs (public variables)?

    What version of NinjaTrader 8 are you using? (Help -> About)

    Can this behavior be reproduced when testing over just a few days of data and then changing the time frame?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Well, this is mostly for optimizations, but happens with backtests. (Indeed, I use backtest to set up for optimizations.) The script uses "SystemPerformance", but in a very limited way (it's inside a bool, which I have turned off most of the time, especially during optimizations). How would that affect compute resources? Seems it would be just very limited in the memory that it would take, especially in comparison to the very large amount of price data that I work with. "IncludeTradeHistoryInBacktest" is not used. There are about a dozen, custom variables. 8.0.24.3 64-bit. Using just a few days, or weeks, or months really doesn't cause this issue.

      I'm pretty sure what's happening is that when the Time frame is changed, the data for that new period is simply added to RAM, which would be the simple way to do this, and generally not a problem -- as long as one doesn't change the Time frame much, and the ranges covered by those Time frames is sufficiently small. I was just wondering if a way has been provided to dump what price data is in RAM (ie, re-set the cache), so I can then select a new Time frame.

      Comment


        #4
        Hello spottysallrite,

        Having IncludeTradeHistoryInBacktest set to true (or not setting this and allowing it to default to true) makes a huge memory impact. Especially for optimizations.
        https://ninjatrader.com/support/help...operties_2.htm

        Try setting IncludeTradeHistoryInBacktest to false and comparing.
        Note, IncludeTradeHistoryInBacktest must be true to access the SystemPerformance collection.


        With Optimizations specifically, you can take advantage of IsInstantiatedOnEachOptimizationIteration being set to false.
        https://ninjatrader.com/support/foru...41#post1071241

        Last, if the strategy is drawing a large amount of drawing objects, you can choose not to instantiate these objects when testing in the Strategy Analyzer.
        https://ninjatrader.com/support/help...egyanalyer.htm


        The current release of NinjaTrader 8 is 8.0.25.0. Be sure to run the latest version for any enhancements and bug fixes.



        Changing the time range I would not expect to change the memory. This would load blank instances of the script. No data would be loaded until the backtest or optimization is actually run.
        If you running a new test, then that would cause historical data to load in memory. However, just changing the time range without running a test I would not expect to cause memory to load.
        Last edited by NinjaTrader_ChelseaB; 04-20-2022, 03:18 PM.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by dwrety, Today, 10:31 AM
        1 response
        7 views
        0 likes
        Last Post dwrety
        by dwrety
         
        Started by apgapg2, Today, 10:04 AM
        0 responses
        10 views
        0 likes
        Last Post apgapg2
        by apgapg2
         
        Started by Preacher, 09-20-2021, 10:11 AM
        13 responses
        1,013 views
        0 likes
        Last Post Gary2751  
        Started by N1tr0, 01-02-2025, 11:25 AM
        8 responses
        120 views
        0 likes
        Last Post N1tr0
        by N1tr0
         
        Started by fincabayano, Today, 05:58 AM
        0 responses
        13 views
        0 likes
        Last Post fincabayano  
        Working...
        X