Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 B6 - Playback-MR - Consuming memory?

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

    NT8 B6 - Playback-MR - Consuming memory?

    Haven't seen this before...


    In my strategy, under certain conditions, I change my SetProfitTarget..and it appears to be leaking memory?



    This was the only changed code.


    I'll retest without.. but this is an odd one.

    This only happens once per day, so it's not like it's being called 1,000,000 times a day. modifiedtarget is reset daily.



    Code:
    			if ( 	NumberOfTrades == 1 )
    			{
    				if (    PositionStatus == LONG 
    					&&  modifiedtarget == 0
    			         )
    				{
    					SetProfitTarget ("strategyUp", CalculationMode.Ticks, 40 );
    					modifiedtarget = 1;
    				}
    				if ( 	PositionStatus == SHORT 
    					&&  modifiedtarget == 0
    				 )
    				{
    					SetProfitTarget ("strategyDown", CalculationMode.Ticks, 40 );
    					modifiedtarget = 1;
    					
    				}
    			}
    Attached Files

    #2
    Yup, NT is becoming unresponsive at this point.

    Comment


      #3
      Could it be this? Do I have to clean this up some how?

      This is also "new".... this maybe be why my replay took 4.5 hours last night instead of 3...

      Memory consumption? I'll test with and without and report back who does what.


      Trade lastTrade = SystemPerformance.AllTrades[SystemPerformance.AllTrades.Count - 1];
      Attached Files
      Last edited by sledge; 11-15-2015, 12:35 PM.

      Comment


        #4
        I had to end task this session, as it was never going to complete.

        It wasn't my code, I've run several variations and not once has NT gone over 400k.

        But -- When you Do NEW->Trade Performance from Control Center - it does start eating memory... and I was doing some of that during that replay that killed me.

        It's like everytime you hit GENERATE - you can see it suck up more memory and never release any.

        If you X it to close it - it releases memory finally...

        There becomes at some point where when switching contracts - or further along in replay - you can become consumed and suck all your memory.

        My testing tonight was upto 600k when I killed it NT was back to under 400k..


        So it appears that having an Trade Performance report open and "refreshing it" to see your latest scores can be detrimental your market replay.

        I just clicked the GENERATE button 10times and consumed 50k.. went from 450,000K to 500,000K...

        I didn't even click it that many times during my initial report... but something ended up getting multiplied exponentially to consume 16 GB of ram.

        Comment


          #5

          Hello,


          Could you please reply with your script attached, so that I may investigate this behavior further?


          You can attach your strategy to your response by going to File > Utilities > Export NinjaScript > Export selected source files > select your strategy > select the right arrow > Export. The file will be located under (My) Documents\NinjaTrader 7\bin\Custom\ExportNinjaScript.


          You could post the script to your forum reply, or send an email to platformsupport [at] ninjatrader [dot] com with the script as an attachment. In the email please include a link to this forum thread.



          Can you also please send me your log and trace files from within NinjaTrader. Go to Control Center-->Help-->Mail to Support in NinjaTrader. Put 'Att Shawn', in the subject field and enable 'Log and trace files'.
          Shawn B.NinjaTrader Customer Service

          Comment


            #6
            Not going to happen with that one. It's my winner.



            Been trying every night with and with modified strategies. Haven't been able to reproduce.
            ---
            [edit]
            tried again tonight. 4th night in a row. Can only get it up to 1 GB.. but it takes some time.. and hasn't go crazy like that weekend.

            I've run several variations of the strategy and even the strategy itself.

            RUnning generate on the Trade Performance is what causes the increase in memory...but nothing expontential... I do know I was running trade performances to get most recent results.. but definitely did not run it as many times as I have tonight or in trying to retest this.
            Last edited by sledge; 11-18-2015, 07:34 PM. Reason: wrong url

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by DavidHP, Today, 07:56 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Erick  
            Started by kujista, Today, 06:23 AM
            3 responses
            9 views
            0 likes
            Last Post kujista
            by kujista
             
            Started by Mindset, Yesterday, 02:04 AM
            2 responses
            18 views
            0 likes
            Last Post NinjaTrader_RyanS  
            Started by f.saeidi, Today, 08:03 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by samish18, 04-17-2024, 08:57 AM
            15 responses
            53 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Working...
            X