NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 05-19-2012, 05:59 AM   #1
Atomic
Member
 
Join Date: Jan 2010
Posts: 85
Thanks: 4
Thanked 5 times in 4 posts
Default NtDirect Memory Utilization

I routinely run the NtDirect dll to provide an external data feed to NT platform from TradeStation. This morning I had an instance of not being able to load a TS chart due to insufficient memory. I shut down all of my TS workspaces except the one providing the external data feed. Task mgr showed 5gb of memory use at this point. When I closed the NT data feed workspace, the memory use dropped to 2gb. Seems like there must be a memory leak associated with this dll?
Atomic is offline  
Reply With Quote
Old 05-21-2012, 07:40 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
Default

Hi Atomic, thanks for the report - we currently have no other similiar one here : is this reproducible on your setup? What NT and TS version would you employ?

What charts were contained in the TS workspace?

Would the memory use be more conservative if you'd used a dedicated workspace containing only the needed instruments for the feed function?

Please also keep in mind this interface was developed for providing a simulated trading feed for a few symbols.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 05-21-2012, 08:05 AM   #3
Atomic
Member
 
Join Date: Jan 2010
Posts: 85
Thanks: 4
Thanked 5 times in 4 posts
Default

I am running TS 9.0 and NT 7.0. The only symbol I am using is @ES.D. The other thing I am doing is a lot of simulated trades, all from @ES.D 3 minute charts.

I'll monitor memory usage more close when I'm doing this and let you know if I see it happen again.

I checked it just now and my memory use sat at 5 gb. I shut down the NT data feed momentarily and turned it back on, and now the memory use is 3.5 gb,
Last edited by Atomic; 05-21-2012 at 08:09 AM.
Atomic is offline  
Reply With Quote
Old 05-21-2012, 09:08 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
Default

Thanks, which TS 9 build would that be? If this would be still available, I could look into reproducing on your exact setup - so far I've not seen such a case and we have quite a few users with this interface option.

Since we don't really support the .D symbol, some occurrences for you if you work on @ES or an individual contract in TS?
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 05-21-2012, 03:01 PM   #5
Atomic
Member
 
Join Date: Jan 2010
Posts: 85
Thanks: 4
Thanked 5 times in 4 posts
Default

I'm on 9.0 (update 8997). I did not have any significant memory consumption today, so I'll keep an eye on it and probably restart it once a day to avoid this problem.

I didn't understand your last question. I only run this to develop code for the broker who trades my systems and is using the NT platform for execution.
Atomic is offline  
Reply With Quote
Old 05-22-2012, 04:39 AM   #6
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
Default

Ok, thanks, please keep me posted on what you see and if this memory buildup would happen reproducibly for you. We cannot support TS's .D unfortunately with this interface option though.
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 05-22-2012, 01:04 PM   #7
Atomic
Member
 
Join Date: Jan 2010
Posts: 85
Thanks: 4
Thanked 5 times in 4 posts
Default

Quote:
Originally Posted by NinjaTrader_Bertrand View Post
Ok, thanks, please keep me posted on what you see and if this memory buildup would happen reproducibly for you. We cannot support TS's .D unfortunately with this interface option though.
So if I used symbol @ES or @ESM12 and created a custom session, that would make a difference?
Atomic is offline  
Reply With Quote
Old 05-22-2012, 02:21 PM   #8
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,781
Thanks: 159
Thanked 565 times in 556 posts
Default

Hell,

You can use @ES with the CME US Index Future RTH session template to plot the day session only for this contract.
NinjaTrader_Matthew is offline  
Reply With Quote
Old 05-22-2012, 03:08 PM   #9
Atomic
Member
 
Join Date: Jan 2010
Posts: 85
Thanks: 4
Thanked 5 times in 4 posts
Default

Quote:
Originally Posted by NinjaTrader_Matthew View Post
Hell,

You can use @ES with the CME US Index Future RTH session template to plot the day session only for this contract.
I know how to make custom sessions in TS. Is TS what we're talking about for custom session or NT? I'm just trying to understand what the relevance of session time is to the memory leak?

At the end of the day today, my memory use sat at 4.8gb. I have restarted the computer with TS + NT + 1 workspace which provides the NT data feed and nothing else. Memory is at 1.50gb. I'm going to leave it run (overnight if I can) and see what happens to memory use.
Atomic is offline  
Reply With Quote
Old 05-22-2012, 03:35 PM   #10
NinjaTrader_Matthew
NinjaTrader Customer Service
 
NinjaTrader_Matthew's Avatar
 
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,781
Thanks: 159
Thanked 565 times in 556 posts
Default

The custom session wouldn't affect the memory itself - we're just suggesting this to mimic what the @ES.D contract does visually on the chart.

We do not support th @ES.D symbols, so to narrow down the issue, it would be great if you could run on the standard @ES symbol and use a custom session template.
NinjaTrader_Matthew is offline  
Reply With Quote
Old 05-22-2012, 04:33 PM   #11
Atomic
Member
 
Join Date: Jan 2010
Posts: 85
Thanks: 4
Thanked 5 times in 4 posts
Default

Quote:
Originally Posted by NinjaTrader_Matthew View Post
The custom session wouldn't affect the memory itself - we're just suggesting this to mimic what the @ES.D contract does visually on the chart.

We do not support th @ES.D symbols, so to narrow down the issue, it would be great if you could run on the standard @ES symbol and use a custom session template.
Ok, I've modified my charts to use @ES with custom session.
Atomic is offline  
Reply With Quote
Old 06-11-2012, 06:42 AM   #12
Atomic
Member
 
Join Date: Jan 2010
Posts: 85
Thanks: 4
Thanked 5 times in 4 posts
Default

I have some ELD's I will send you to demonstrate the memory leak. Where do you want me to send them to?
Atomic is offline  
Reply With Quote
Old 06-11-2012, 06:57 AM   #13
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

support at ninjatrader dot com

ATTN: Brett in the subject line and reference this post.

-Brett
NinjaTrader_Brett is offline  
Reply With Quote
Old 06-11-2012, 06:49 PM   #14
Atomic
Member
 
Join Date: Jan 2010
Posts: 85
Thanks: 4
Thanked 5 times in 4 posts
Default

Here is a picture of the problem. Turns out the memory is being taken up by orchart.exe. When I close and reopen the chart that is communicating with the NtDirect, the memory commitment to orchart.exe decreases by 1 Gb. I believe this problem is caused by the NTFilled function calls, but I can't be sure and I have no idea of how to deal with the problem. Suggestions welcome.
Attached Images
File Type: jpg RM 06.JPG (122.4 KB, 7 views)
Atomic is offline  
Reply With Quote
Old 06-12-2012, 06:43 AM   #15
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,498
Thanks: 109
Thanked 291 times in 280 posts
Default

What is orchart?

Thanks.
NinjaTrader_Brett is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NT performance and resource utilization boaza Automated Trading 1 12-19-2011 09:12 AM
NTDirect Interface mrlogik Automated Trading 2 06-17-2011 05:12 AM
NtDirect setup Atomic Automated Trading 3 04-21-2011 01:02 PM
Memory returned by NTDIRECT.DLL Orders, and use of SetAllocReturnString arguments douggreen Automated Trading 1 04-05-2011 04:21 PM
CPU utilization spenbm01 Automated Trading 11 06-19-2006 04:56 PM


All times are GMT -6. The time now is 08:25 PM.