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

  #31 (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

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...

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


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


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
 
  #34 (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


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

@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)
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

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.

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


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

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.

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


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
The following user says Thank You to Fat Tails for this post:
 
  #39 (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
.... 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)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,602 received
Forum Reputation: Legendary



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
The following 2 users say Thank You to Fat Tails for this post:

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 02:48 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-18 in 0.14 seconds with 20 queries on phoenix via your IP 54.92.194.75