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

  #21 (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
thanks bnichols,

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


Yes I do.

But... I only have the essential indicators in my NT files.

I do not keep any indicators that I do not use to trade with.

If I write a custom indicator for someone , I store it in another directory and delete it from my NT system .

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

My daddy always said, "Every day above ground is a good day!"

Last edited by ThatManFromTexas; September 12th, 2012 at 10:26 AM. Reason: Piss Poor Typing
Reply With Quote
 
  #22 (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

Shutdown antivirus, logged in as windows 7 administrator... testing again. On the last startup I started around 250k and shut down when memory usage reached 1.4 gigs. It just creeps up with each new bar coming into the chart.

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


Tried shutting down antivirus program. Did not stop the leak. Removed adxvma, leak seemed to stop, memory stopped running higher. Restarted with new workspace, no adxvma, and memory is fluctuating modestly below the 200k level. It would seem my pc does not work with adxvma/adxvma keltner channel.

If it is leaking now it is imperceptible. When it is leaking the memory moves in one direction only. Now it is gently fluctuating up and down but not trending higher. I will watch this for some time and try to see if it is leaking at all. It seems yesterday when I applied adxvma to native ninja bars I had a similar result. I will try that after this test. I'm afraid it would seem I am just unlucky with the pc I am running, perhaps I will just have to trade without any indicators....

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

Now adding adxvma standalone indicator.

It would seem there is no leak being triggered by anaADXvma. Stable.

Next, will add channels.

Reply With Quote
 
  #25 (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 ADXVMA Channels, NO LEAK.

NOW I AM REALLY STARTING TO LOOK LIKE A CLOWN IN THE CIRCUS FOR THE MENTALLY RETARDED

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


syxforex View Post
ADDED ADXVMA Channels, NO LEAK.

NOW I AM REALLY STARTING TO LOOK LIKE A CLOWN IN THE CIRCUS FOR THE MENTALLY RETARDED

NT (if not trading in general) can sometimes do that to us

Reply With Quote
The following user says Thank You to bnichols for this post:
 
  #27 (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

i believe this line may be causing incorrect volume calculations in MomentumBarsType:
 
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 : bar.Volume), isRealtime);
reviewing the ninja implementation in PnF and Kagi suggests i may need to store a volumeCount local variable and use that for all UpdateBar() calls.

here's a snip from @BarsType.cs line 425:
 
Code
			if (endOfBar)
				CalculateKagiBar(bars, o, h, l, c, prevTime, volume, isRealtime);
			else
				volumeCount += volume;
i'm a bit swamped at the moment, but once i have a moment to test and fix the problem, i will post an update back in the main thread.

cheers,
-e

Reply With Quote
The following user says Thank You to eman for this post:
 
  #28 (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

to clarify my previous post:

with MomentumBars, the GapSetting you use will make a difference in that line i identified.

here's the bit of code that matters from that line:
 
Code
(GapSetting == 3 ? volume : bar.Volume)
you could just replace that whole block with "volume" if you prefer to use the NoGap (value = 1) or TickThru (value = 2) options instead of OnTouch (value = 3).

hope this helps.

cheers,
-e

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

Reply With Quote
The following user says Thank You to syxforex for this post:
 
  #30 (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 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....

no worries - i'm glad you brought that back up. there was discussion a while back in the other thread about volume calculations being suspect.

it's now on my radar screen again, and i shall soon have a patch in place.

glad you're zeroing in on the issue. code stuff is frustrating sometimes.

cheers,
-e

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 06:40 AM.

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-15 in 0.13 seconds with 20 queries on phoenix via your IP 107.20.115.174