NT7 custom user code causing memory leak - NinjaTrader | futures io social day trading
futures io futures trading


NT7 custom user code causing memory leak
Updated: Views / Replies:6,519 / 49
Created: by syxforex Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 1  
 
Thread Tools Search this Thread
 

NT7 custom user code causing memory leak

  #11 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,652 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary


syxforex View Post
Thanks for taking a look.

I am at a loss then. I now have my the charts up and running the adxvma keltner channels, channels only, no centre line, no adxvma on in addition to the UKC. There is no memory leak. If I add the anaadxvma with bar paint and plot the memory begins to leak. What else could I look at in my system? I did a fresh install yesterday, only three indicators installed, anavwap, anaadx, and anakeltner Univeral.


thanks again,

-> Did you test whether the memory leak occurs on other than momentum bars?
-> If no, which version of the momentum bars did you install?
-> Did you make sure that no workspace is running in the background?
-> Can you provide us with the exact settings of your chart and all indicators?
-> Do you have any assemblies installed?
-> Do you have other custom indicators installed on NinjaTrader?

For every indicator that you install on NinjaTrader the Initialize() section is executed, even when the indicator is not set up on a chart. This means that any indicator, which you have downloaded into bin -> Custom -> Indicator folder can create the problem. A new installation of NinjaTrader has no impact on the problems.

Best you rename your folder Documents -> NinjaTrader 7 to NinjaTrader 7 old (do not delete it, if you just rename it your decision is reversible). NinjaTrader will then create a new clean folder. You will still be able to copy your indicators, chart and workspace templates to the new installation, just instrument settings and session templates will be lost, as they are not stored separately.

Reply With Quote
The following 3 users say Thank You to Fat Tails for this post:
 
  #12 (permalink)
 Vendor: www.coroin.com 
Galveston ,TX
 
Futures Experience: Intermediate
Platform: NT7
Broker/Data: Zaner
Favorite Futures: Futures
 
Posts: 386 since Mar 2010
Thanks: 364 given, 433 received


syxforex View Post
Thanks for taking a look.

I am at a loss then. I now have my the charts up and running the adxvma keltner channels, channels only, no centre line, no adxvma on in addition to the UKC. There is no memory leak. If I add the anaadxvma with bar paint and plot the memory begins to leak. What else could I look at in my system? I did a fresh install yesterday, only three indicators installed, anavwap, anaadx, and anakeltner Univeral.


thanks again,

do you happen to have any other custom bar types to test with? i believe @aslan's BetterRenko is one of the more widely used here.

also, what GapSetting are you using with MomentumBars? and are you running fixed-height or dynamic?

cheers,
-e

Reply With Quote
 
  #13 (permalink)
Elite Member
Houston,Tx
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: TF
 
ThatManFromTexas's Avatar
 
Posts: 2,302 since Feb 2010
Thanks: 1,208 given, 4,293 received



syxforex View Post
OK, TMT, sorry to waste your time. I didn't give you the complete setup. In addition to the keltner channel I was using the adxvma separately as the centre line. I thought it was one in the same indicator. It appears there is no memory leak with the adxvma keltners, but the leak may be associate with the adxvma itself, when applied indepently and seaparetly. I am watching now, does not appear to be leaking but will let you update when I know for sure.... thanks again

@syxforex

I added the additional adxvma to each chart.

They have been running for over an hour... no effect.

I think @Fat Tails hit the nail on the head that it may be another indicator you have imported .... even though it is not on your chart.

For this very reason I only keep essential indicators in my NT indicator file.

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
 
  #14 (permalink)
Elite Member
@ Germany
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: FDAX
 
Posts: 440 since Nov 2011
Thanks: 254 given, 369 received

I wouldn't use the term "memory leak". It's very unlikely that anyone uses unmanaged code within ninjatrader. The C# objects lifetime will be managed thru the garbage collector very effectively. But a indicator could allocate new objects at every tick and "use" all of the objects, so that the garbage collector can't remove these objects. I recommend (like Fat Tails already does) to take a plain install and add all the things step by step and check the memory after every step.

Reply With Quote
The following user says Thank You to Koepisch for this post:
 
  #15 (permalink)
Membership Revoked
British Columbia
 
Futures Experience: Advanced
Platform: NINJA
Broker/Data: ZEN
Favorite Futures: Crude
 
Posts: 1,091 since May 2010
Thanks: 192 given, 484 received

Thanks a lot TMT,

Well, just trying to reproduce it now..... hmmm the memory poltergeist is not here...





ThatManFromTexas View Post
@syxforex

I added the additional adxvma to each chart.

They have been running for over an hour... no effect.

I think @Fat Tails hit the nail on the head that it may be another indicator you have imported .... even though it is not on your chart.

For this very reason I only keep essential indicators in my NT indicator file.


Reply With Quote
 
  #16 (permalink)
Membership Revoked
British Columbia
 
Futures Experience: Advanced
Platform: NINJA
Broker/Data: ZEN
Favorite Futures: Crude
 
Posts: 1,091 since May 2010
Thanks: 192 given, 484 received

So strange, I rebuilt the workspace from scratch, identically, and find that the leak has disappeared.. the market is very slow right now, perhaps tomorrow when it is moving again it will reappear..... For two days i have been restarting ninjatrader just about on the hour every hour, during the US session, to bring the memory footprint back down to earth, all of a sudden it seems to be normal..

Reply With Quote
 
  #17 (permalink)
Membership Revoked
British Columbia
 
Futures Experience: Advanced
Platform: NINJA
Broker/Data: ZEN
Favorite Futures: Crude
 
Posts: 1,091 since May 2010
Thanks: 192 given, 484 received

Thanks for everybody's help. I will get back to you with more details as I run some more tests...

Reply With Quote
 
  #18 (permalink)
Elite Member
Dartmouth NS
 
Futures Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker/Data: IB / IQFeed / Kids
Favorite Futures: Forex, stocks
 
bnichols's Avatar
 
Posts: 638 since Feb 2010
Thanks: 64 given, 459 received

Following this thread mostly because I'll be interested to know what you find (after a few years and a couple of versions of NT I'm still facing similar issues) rather than because I have anything much to add.

In my case, until a couple of weeks ago when I moved NT to a stripped down operating environment it would function normally but with degrading performance until it failed, typically with irreparable database corruption. However, in the latest go-around what initially seemed to be memory management issues with NT turns out to be likely memory management issues with the Windows 7 environment, evidence being NT seems happy as a clam running so far on the bare bones system, absolutely nothing else installed, while the system on which it was previously installed grinds inexorably to a halt due to disappearing memory (leak somewhere unless faulty memory allocation in Windows 7 when challenged is simply the sort of MS product feature we've come to know and love). Some apps deal with disappearing resources more gracefully than others. For me therefore the problem with NT is that a resource-related threshold seems to exist that when exceeded causes NT to shoot itself in the head. For example (as you likely know) when virus checkers lock NT out of files it needs to function it's game over.

While I have come across badly behaved indicators find NT tends to recover when these are removed and to date cannot point to any (including ana- series) or any combination of indicators as being at the root of it. Assume at present some indicators use (modest amounts of) additional memory as time passes possibly because internal structures are holding more data.

Reply With Quote
The following 2 users say Thank You to bnichols for this post:
 
  #19 (permalink)
Membership Revoked
British Columbia
 
Futures Experience: Advanced
Platform: NINJA
Broker/Data: ZEN
Favorite Futures: Crude
 
Posts: 1,091 since May 2010
Thanks: 192 given, 484 received

Would anybody be able to tell a technically lay person, in easy language, how to monitor NT7 memory usage. I did a clean install of NT7 this morning. I have added two indicators and the momentum bars. I am now monitoring the memory usage and I see that it seems to be moving higher. Is this normal? As new bars come into the chart should NT7's memory footprint rise or should it stay in a level range? What is normal?

thanks for your assistance

Reply With Quote
 
  #20 (permalink)
Membership Revoked
British Columbia
 
Futures Experience: Advanced
Platform: NINJA
Broker/Data: ZEN
Favorite Futures: Crude
 
Posts: 1,091 since May 2010
Thanks: 192 given, 484 received


thanks bnichols,

My pc is pretty basic, nt7 and zone alarm anti virus... THATMANFROMTEXAS... do you have antivirus program in background?


bnichols View Post
Following this thread mostly because I'll be interested to know what you find (after a few years and a couple of versions of NT I'm still facing similar issues) rather than because I have anything much to add.

In my case, until a couple of weeks ago when I moved NT to a stripped down operating environment it would function normally but with degrading performance until it failed, typically with irreparable database corruption. However, in the latest go-around what initially seemed to be memory management issues with NT turns out to be likely memory management issues with the Windows 7 environment, evidence being NT seems happy as a clam running so far on the bare bones system, absolutely nothing else installed, while the system on which it was previously installed grinds inexorably to a halt due to disappearing memory (leak somewhere unless faulty memory allocation in Windows 7 when challenged is simply the sort of MS product feature we've come to know and love). Some apps deal with disappearing resources more gracefully than others. For me therefore the problem with NT is that a resource-related threshold seems to exist that when exceeded causes NT to shoot itself in the head. For example (as you likely know) when virus checkers lock NT out of files it needs to function it's game over.

While I have come across badly behaved indicators find NT tends to recover when these are removed and to date cannot point to any (including ana- series) or any combination of indicators as being at the root of it. Assume at present some indicators use (modest amounts of) additional memory as time passes possibly because internal structures are holding more data.


Reply With Quote

Reply



futures io > > > > NT7 custom user code causing memory leak

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Importing Custom Indicator Causing Error Problems shmcclun NinjaTrader 17 May 23rd, 2016 11:29 AM
Custom Toolbar Button for NT7 protrader007 The Elite Circle 38 February 24th, 2013 09:38 AM
NT7 memory use & 32- / 64-bit SARdynamite NinjaTrader Programming 22 May 7th, 2012 09:19 AM
Wicked Renko custom bar type for NT7 aslan NinjaTrader Programming 25 March 10th, 2012 11:13 AM
Market Wizard's: Create your custom user title Big Mike Beginners and Introductions 0 December 12th, 2009 07:31 AM


All times are GMT -4. The time now is 12:41 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-13 in 0.15 seconds with 20 queries on phoenix via your IP 54.82.79.109