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,139 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

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


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!"
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Ninja Mobile Trader VPS (ninjamobiletrader.com)
Trading Reviews and Vendors
Build trailing stop for micro index(s)
Psychology and Money Management
Better Renko Gaps
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Futures True Range Report
The Elite Circle
 
  #22 (permalink)
 syxforex 
British Columbia
 
Experience: Advanced
Platform: NINJA
Broker: ZEN
Trading: Crude
Posts: 1,091 since May 2010

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.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #23 (permalink)
 syxforex 
British Columbia
 
Experience: Advanced
Platform: NINJA
Broker: ZEN
Trading: Crude
Posts: 1,091 since May 2010


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

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #24 (permalink)
 syxforex 
British Columbia
 
Experience: Advanced
Platform: NINJA
Broker: ZEN
Trading: Crude
Posts: 1,091 since May 2010

Now adding adxvma standalone indicator.

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

Next, will add channels.

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #25 (permalink)
 syxforex 
British Columbia
 
Experience: Advanced
Platform: NINJA
Broker: ZEN
Trading: Crude
Posts: 1,091 since May 2010

ADDED ADXVMA Channels, NO LEAK.

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

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #26 (permalink)
 
bnichols's Avatar
 bnichols 
Dartmouth NS
 
Experience: Intermediate
Platform: MC, MC.Net, NT, TWS
Broker: IB / IQFeed / Kids
Trading: Forex, stocks
Posts: 637 since Feb 2010
Thanks Given: 64
Thanks Received: 460


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

Visit my NexusFi Trade Journal Reply With Quote
  #27 (permalink)
 eman 
Galveston ,TX
 
Experience: Intermediate
Platform: NT7
Broker: Zaner
Trading: Futures
Posts: 386 since Mar 2010
Thanks Given: 364
Thanks Received: 435

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
Thanked by:
  #28 (permalink)
 eman 
Galveston ,TX
 
Experience: Intermediate
Platform: NT7
Broker: Zaner
Trading: Futures
Posts: 386 since Mar 2010
Thanks Given: 364
Thanks Received: 435

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

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

Visit my NexusFi Trade Journal Started this thread Reply With Quote
  #30 (permalink)
 eman 
Galveston ,TX
 
Experience: Intermediate
Platform: NT7
Broker: Zaner
Trading: Futures
Posts: 386 since Mar 2010
Thanks Given: 364
Thanks Received: 435



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




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