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,505 / 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

  #41 (permalink)
Elite Member
Cincinnati Ohio
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Futures Broker
Favorite Futures: AUD
 
Silver Dragon's Avatar
 
Posts: 1,597 since Feb 2011
Thanks: 3,860 given, 3,318 received


Fat Tails View Post
Also when the paint bars leak you would probably see that on your chart.


@Fat Tails

ROTFLMAO!! Made my day!

nosce te ipsum

You make your own opportunities in life.
Reply With Quote
 
  #42 (permalink)
Elite Member
Tucson
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: CL, TF
 
Posts: 110 since Jan 2011
Thanks: 110 given, 68 received

Memory Leak in Replay with Momentum Bars

Thanks Eman, I too have seen some memory issues with the Momentum bars. Do you have a fix for that yet?
In trying to isolate the problem, I ran the charts normal and all was good. Then I paused the replay and added the Momentum and whamo....mem starts going crazy and NT is not functioning at all. I hate to do a hard NT shutdown, but that is the only way to get it back.

Thx
Bob



eman View Post
as per my potential offending code, i'm trying to get an answer from NinjaTrader directly:
clarify Add() in BarsType - NinjaTrader Support Forum

this is untested, but if you're still working with MomentumBars, try changing this code (approx line 114):
 
Code
// close current bar; volume included for on-touch only
UpdateBar(bars, bar.Open, (maxCompare > 0 ? thisClose : bar.High), (minCompare < 0 ? thisClose : bar.Low), thisClose, time, (GapSetting == 3 ? volume : 0), isRealtime);
old code may have been overstating volume. not sure that would cause a leak, per se, but i guess it depends on how the indicator was coded.

you may also want to check this line (approx line 138):
 
Code
// add new bar; include volume once (except for on-touch), then create phantom bars
AddBar(bars, thisOpen, (maxCompare > 0 ? thisClose : thisOpen), (minCompare < 0 ? thisClose : thisOpen), thisClose, time, (GapSetting != 3 && newBar ? volume : 0), isRealtime);
basically, any reference to bar.Volume is suspect, and those are the only two places where that may have appeared.

the only thing that perplexes me is that volumeCount (used in Kagi, for example) is used for both AddBar() and UpdateBar() calls. so i guess it's possible that UpdateBar() does all kinds of magic under the hood.

best to get a straight answer from the source. working on it.

cheers,
-e


Reply With Quote
 
  #43 (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



bobc635 View Post
Thanks Eman, I too have seen some memory issues with the Momentum bars. Do you have a fix for that yet?
In trying to isolate the problem, I ran the charts normal and all was good. Then I paused the replay and added the Momentum and whamo....mem starts going crazy and NT is not functioning at all. I hate to do a hard NT shutdown, but that is the only way to get it back.

Thx
Bob

@bobc635

What settings are you using?

I use ....

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


and have had no issues.

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
 
  #44 (permalink)
Elite Member
Tucson
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: CL, TF
 
Posts: 110 since Jan 2011
Thanks: 110 given, 68 received

Wow...maybe I grabbed an old version.... I am running r589 ( I like having rev controlled indis), so I only have R (I use 5) and Gap Setting (I use 2).... What version are you running?

BTW, my son is in Houston... he loves it...coming to visit in Nov for the F1 race in Austin

Thanks



ThatManFromTexas View Post
@bobc635

What settings are you using?

I use ....

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


and have had no issues.


Reply With Quote
 
  #45 (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


bobc635 View Post
Wow...maybe I grabbed an old version.... I am running r589 ( I like having rev controlled indis), so I only have R (I use 5) and Gap Setting (I use 2).... What version are you running?

BTW, my son is in Houston... he loves it...coming to visit in Nov for the F1 race in Austin

Thanks

r809

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
The following user says Thank You to ThatManFromTexas for this post:
 
  #46 (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

the last version on futures.io (formerly BMT) is r809.

the latest version is r860 but there are no logical changes between r809 and r860 - just the addition of the GPL license so it is free-for-all.

i'm still investigating the memory leak issue but haven't had a chance to fully test the proposed code above to see if that cures the problem.

a new version is due out next week which will include extra public properties (requested by indicator developers), a patch for volume (mentioned previously in this thread), and a few other goodies as time permits.

cheers,
-e

Reply With Quote
The following 2 users say Thank You to eman for this post:
 
  #47 (permalink)
Elite Member
Tucson
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: CL, TF
 
Posts: 110 since Jan 2011
Thanks: 110 given, 68 received

I downloaded the newrt version and it seems to be stable so far...will test it in replay tonight....

Thanks



bobc635 View Post
Wow...maybe I grabbed an old version.... I am running r589 ( I like having rev controlled indis), so I only have R (I use 5) and Gap Setting (I use 2).... What version are you running?

BTW, my son is in Houston... he loves it...coming to visit in Nov for the F1 race in Austin

Thanks


ThatManFromTexas View Post
r809


Reply With Quote
 
  #48 (permalink)
Elite Member
Toronto Canada
 
Futures Experience: Intermediate
Platform: ninjatrader
Favorite Futures: es
 
mmaker's Avatar
 
Posts: 353 since Feb 2011
Thanks: 1,169 given, 393 received

memory leak


Fat Tails View Post

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.

Would this slow NT7 down? I downloaded many indicators and coded many others. I prolly have 100-200 or more custom indicators in NT7.

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


mmaker View Post
Would this slow NT7 down? I downloaded many indicators and coded many others. I prolly have 100-200 or more custom indicators in NT7.

This slows down the compilation process. It also causes an additional waiting time when you add indicators to your chart or when you edit any indicator. It may halt NinjaTrader, if only one of our 200 indicators has a bug in the Initialize() section.

It will not affect the chart while it is running, as the Initialize() section of all indicator is only being executed when a new indicator is added to your chart. Once your chart is up and running, there should be no impact.

Reply With Quote
 
  #50 (permalink)
Elite Member
Toronto Canada
 
Futures Experience: Intermediate
Platform: ninjatrader
Favorite Futures: es
 
mmaker's Avatar
 
Posts: 353 since Feb 2011
Thanks: 1,169 given, 393 received

Thanks



Fat Tails View Post
This slows down the compilation process. It also causes an additional waiting time when you add indicators to your chart or when you edit any indicator. It may halt NinjaTrader, if only one of our 200 indicators has a bug in the Initialize() section.

It will not affect the chart while it is running, as the Initialize() section of all indicator is only being executed when a new indicator is added to your chart. Once your chart is up and running, there should be no impact.

Appreciate your response. Also Thanks for your work on SuperTrend.

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)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

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 03:13 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-11 in 0.15 seconds with 20 queries on phoenix via your IP 54.226.172.30