NexusFi: Find Your Edge


Home Menu

 





NT7 custom user code causing memory leak


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one syxforex with 19 posts (3 thanks)
    2. looks_two ThatManFromTexas with 7 posts (1 thanks)
    3. looks_3 Fat Tails with 7 posts (8 thanks)
    4. looks_4 eman with 6 posts (3 thanks)
      Best Posters
    1. looks_one bnichols with 1.5 thanks per post
    2. looks_two Fat Tails with 1.1 thanks per post
    3. looks_3 eman with 0.5 thanks per post
    4. looks_4 syxforex with 0.2 thanks per post
    1. trending_up 16,486 views
    2. thumb_up 19 thanks given
    3. group 8 followers
    1. forum 49 posts
    2. attach_file 1 attachments




 
Search this Thread

NT7 custom user code causing memory leak

  #31 (permalink)
 syxforex 
British Columbia
 
Experience: Advanced
Platform: NINJA
Broker: ZEN
Trading: Crude
Posts: 1,091 since May 2010

Added back price action swing pro. And for now there appears to be no leak.

I have restarted the system a few times, turned on/off avirus, av is currently on. I can't explain it. What might have changed things, a restart, logging in as administrator instead of user, and rebuilding the chart from scratch. I should probably have started with a new workspace. At any rate, But for now, there is no leak.

I have all four indicators running, vwap, adxvma, adxvma/kelt, and pas pro. I will keep close eye on this and let you know if it starts to to run again...

Visit my NexusFi Trade Journal Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
17 thanks
  #32 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


syxforex View Post
Thanks Eman,

I'm almost too embarassed to reveal this, but there was third indicator that I omitted from my analysis, even after you all quite explicity asked for my complete setup, I can't explain why I omitted this, anyways, I had been using price action swing indicator as well. It's the only thing missing from my chart now where previously there was a leak. I guess I should test it now as well....

@syxforex: It is really necessary that you test the indicators one by one on different bar types. This is the only way to identify the culprit. All of us are interested to understand where the leak comes from. I am 90% sure that it is related to some improper coding, and I never would exclude myself.

However, you are the only one so far who noticed the leak, so it would be up to you to identify the exact conditions under which the leak occurs and to reproduce them. If we have a reproducible setup, it should be easy to fix the problem.

Reply With Quote
Thanked by:
  #33 (permalink)
 eman 
Galveston ,TX
 
Experience: Intermediate
Platform: NT7
Broker: Zaner
Trading: Futures
Posts: 386 since Mar 2010
Thanks Given: 364
Thanks Received: 435


as per my potential offending code, i'm trying to get an answer from NinjaTrader directly:
clarify Add() in BarsType - [AUTOLINK]NinjaTrader[/AUTOLINK] 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
  #34 (permalink)
 
ThatManFromTexas's Avatar
 ThatManFromTexas 
Houston,Tx
 
Experience: Advanced
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: TF
Posts: 2,265 since Feb 2010
Thanks Given: 1,206
Thanks Received: 4,353


eman View Post
as per my potential offending code, i'm trying to get an answer from NinjaTrader directly:
clarify Add() in BarsType - [AUTOLINK]NinjaTrader[/AUTOLINK] 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

@eman

I use the momentum bars ... I have not had memory problems... well ... at least my computer hasn't

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
  #35 (permalink)
 syxforex 
British Columbia
 
Experience: Advanced
Platform: NINJA
Broker: ZEN
Trading: Crude
Posts: 1,091 since May 2010

I think I have narrowed down the leak to the paint bars feature in the adxvma. When I have two instances of the indicator running, of the same bar lenght, one set to plot true paint bar false, the other set to paint bar true, plot false, the leak seems to trigger. Does anybody else see this? I have no leak so long as I have the paint bars turned off.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #36 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


syxforex View Post
I think I have narrowed down the leak to the paint bars feature in the adxvma. When I have two instances of the indicator running, of the same bar lenght, one set to plot true paint bar false, the other set to paint bar true, plot false, the leak seems to trigger. Does anybody else see this? I have no leak so long as I have the paint bars turned off.

Are you talking about the paint bars of the Keltner Channel or the paint bars of the ADXVMA? Are you talking about the anaADXVMA or the ADXVMA?

You have talked a lot, but you have never posted a screenshot and indicator settings allowing us to reproduce the problem.

Please post the exact indicator settings and myself and probably @ThatManFromTexas will let it run on our PCs.

Reply With Quote
Thanked by:
  #37 (permalink)
 syxforex 
British Columbia
 
Experience: Advanced
Platform: NINJA
Broker: ZEN
Trading: Crude
Posts: 1,091 since May 2010

Yes, sorry, I'm on some crap that's making me delerious, my head feels like it's going to split open... anyways, apologize for the lack of a scientific method in all this, I've been a freak this week, feeling very pressured to get back to trading.

Well, my screen is on my other pc at this second and I'm getting off the desk. Currently, I have only adxvma/keltner bands on the chart, (not using the standalone adxvma), 3 instances, 50 period each, 2,3,4 standard deviations. I have no leak. If I turn on the paint bars on one of the adxvma/keltner indicators the memory will start to leak. I have to go now before I puke...

thanks again for the indicator, I do love it.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #38 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


syxforex View Post
Yes, sorry, I'm on some crap that's making me delerious, my head feels like it's going to split open... anyways, apologize for the lack of a scientific method in all this, I've been a freak this week, feeling very pressured to get back to trading.

Well, my screen is on my other pc at this second and I'm getting off the desk. Currently, I have only adxvma/keltner bands on the chart, (not using the standalone adxvma), 3 instances, 50 period each, 2,3,4 standard deviations. I have no leak. If I turn on the paint bars on one of the adxvma/keltner indicators the memory will start to leak. I have to go now before I puke...

thanks again for the indicator, I do love it.

I can only do the testing here, if I have the exact settings for the entire chart including the settings for the chart bars and the indicators on the chart. I would need a screenshot of the chart (please do not hide the indicator parameters) and a screenshot of the indicator dialogue box. I would like to the instrument as well and the session template.

Just an example. There is no appropriate session template for ES 12-12 which allows to display the break from 4:30 to 5:00 PM Central Time. If you enter that into your template, then NinjaTrader will catch a false start of the trading day, because the heuristics used does not cover it.

This creates specific problems, which will only occur with CME traded index futures, and which cannot be found with any other instrument.

So it is important to know the instrument traded and the session template used.

Without information, nobody will be able to fix the problem. And I strongly believe that there is a problem, as memory leaks can happen for various reasons.

Reply With Quote
Thanked by:
  #39 (permalink)
 
ThatManFromTexas's Avatar
 ThatManFromTexas 
Houston,Tx
 
Experience: Advanced
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: TF
Posts: 2,265 since Feb 2010
Thanks Given: 1,206
Thanks Received: 4,353


syxforex View Post
.... I have no leak. If I turn on the paint bars on one of the adxvma/keltner indicators the memory will start to leak. .....

@syxforex

Have you considered not doing that....

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
  #40 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102



ThatManFromTexas View Post
@syxforex

Have you considered not doing that....

Also when the paint bars leak you would probably see that on your chart.

Reply With Quote




Last Updated on November 21, 2016


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts