Reducing CPU load of NinjaTrader - NinjaTrader Programming | futures io social day trading
futures io futures trading


Reducing CPU load of NinjaTrader
Updated: Views / Replies:8,845 / 37
Created: by Fat Tails Attachments:3

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
 3  
 
Thread Tools Search this Thread
 

Reducing CPU load of NinjaTrader

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


cory View Post
if it calc on every tick use fitsttickofbar should show an improvement.

I need an indicator to update intrabar, so I cannot use "FirstTickOfBar". I have my chart set to a display update of 0.5 seconds. This means that the chart is updated 120 times per minute. It also means that all calculations performed by Plot() will beexecuted at most 120 times per minute.

During a news release ES is heavily traded, generating maybe 1000 ticks and more. The default setting for the display update prevents NinjaTrader from freezing under these conditions, and the chart can still be updated intrabar. This filtering is applied to Plot().

If I do not override Plot(), but use some of the Draw() methods in OnBarUpdate(), I do not know, whether these will be executed 1000 times per minute (unfiltered) or just 120 times according to the display update settings.

I want to use these methods intrabar, otherwise I would not have put the question here.

Reply With Quote
 
  #12 (permalink)
Elite Member
Madison, WI
 
Futures Experience: Advanced
Platform: Sierra Charts, ALT
Favorite Futures: ES
 
aslan's Avatar
 
Posts: 614 since Jan 2010
Thanks: 342 given, 1,077 received


Fat Tails View Post
If I use DrawRectangle() or DrawLine() or any of the other Draw() methods in OnBarUpdate(), will display update intervals as fixed via chart properties apply or will it be calculated with every incoming tick?

This is a good question for Ninja support. This could be an item that would trigger a refresh, regardless of the update interval.

Reply With Quote
The following user says Thank You to aslan for this post:
 
  #13 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary



aslan View Post
This is a good question for Ninja support. This could be an item that would trigger a refresh, regardless of the update interval.

If nobody knows it here, I will ask the question at Ninja support and come back.

Reply With Quote
 
  #14 (permalink)
Elite Member
Madison, WI
 
Futures Experience: Advanced
Platform: Sierra Charts, ALT
Favorite Futures: ES
 
aslan's Avatar
 
Posts: 614 since Jan 2010
Thanks: 342 given, 1,077 received

If the Draw() methods are causing your charts to update, then you can do similar caching/short cutting to only call it once in your indicators, or only when the anchor point changes.

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


aslan View Post
If the Draw() methods are causing your charts to update, then you can do similar caching/short cutting to only call it once in your indicators, or only when the anchor point changes.

Yes, that should be possible. But anyhow, try to understand how these Draw() methods work. I have one simple indicator which is supposed to run in CalcOnBarClose = false mode, and as I was lazy to write a custom plot I have employed the Draw() methods to achieve what I wanted.

Just want to know whether there is a risk that this indicator slows down NT.

https://futures.io/free_downloads/ninjatrader-7/indicators/749-download.html?view

Attached Thumbnails
Reducing CPU load of NinjaTrader-ym-12-10-5-min-02_12_2010.jpg  

Last edited by Fat Tails; December 3rd, 2010 at 10:46 AM.
Reply With Quote
 
  #16 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,238 since Jun 2009
Thanks: 29,350 given, 83,221 received

Reducing CPU load and making more efficient indicators is an admirable goal, don't get me wrong --- but I think for any modern quad core CPU, there should be no issue.

With MultiCharts, even though I only trade CL, I have TF, ES, 6E, DX and YM loaded in the background. Each workspace has 5 charts (CL has 6). They are all running on what Ninja would call "COBC false" with a couple of indicators per chart.

My total CPU usage is about 3%. I see spikes to 10% every now and then, but rare. I have a i7 920 overclocked to 4ghz.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


This machine is already two years old (well, 21 months). So really any quad core CPU bought in the last 4 years is probably more than fast enough to not worry about this per-tick stuff.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

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


Big Mike View Post
Reducing CPU load and making more efficient indicators is an admirable goal, don't get me wrong --- but I think for any modern quad core CPU, there should be no issue.

Mike

You are funny. Not everybody has a quad core CPU, I don't. My equipment is three years old and has a dual core CPU. Also my questions were relating to NinjaTrader, not to MultiCharts.

CPU load for my default workspace typically oscillates between 20% and 40%. I have had no freezes and there are no problems, but I need to monitor CPU load. And everybody who runs NinjaTrader on equipment which is not the newest generation should as well.

RAM usage has gone down considerably with NT 7.0, but CPU load has increased, as they have optimized against it.

If there was no CPU problem, I would not have started this thread.



Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
 
  #18 (permalink)
Elite Member
Quebec
 
Futures Experience: Intermediate
Platform: NinjaTrader wt Rancho Dinero's profiling tools
Broker/Data: Stage 5 trading/AMP/CQG
Favorite Futures: ES, NQ, YM
 
trendisyourfriend's Avatar
 
Posts: 3,697 since Oct 2009
Thanks: 3,041 given, 4,496 received

Fat maybe you could try cacheman to optimise your CPU usage.

Reply With Quote
 
  #19 (permalink)
Administrator: Retired Backtester
 Vendor: speedytradingservers.com 
Rennes France
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
 
sam028's Avatar
 
Posts: 3,366 since Jun 2009
Thanks: 3,572 given, 3,982 received


trendisyourfriend View Post
Fat maybe you could try cacheman to optimise your CPU usage.

Cacheman will only help for memory/disk caching problems.
Some of @Fat Tails indicators needs a lot of data, so a lot of things to compute, memory or disk access time is not the problem, it's the CPU itself.
As NT multi-thread capabilities are not perfect, the easier solution is to use a fast CPU, having more than 4 cores won't help a lot, imho.

Success requires no deodorant! (Sun Tzu)
Reply With Quote
 
  #20 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,651 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary



sam028 View Post
Cacheman will only help for memory/disk caching problems.
Some of @Fat Tails indicators needs a lot of data, so a lot of things to compute, memory or disk access time is not the problem, it's the CPU itself.
As NT multi-thread capabilities are not perfect, the easier solution is to use a fast CPU, having more than 4 cores won't help a lot, imho.

It is not the amount of data that causes the problem. The FibonacciZones indicator, which uses a comparatively large data base, does not create any CPU load at all, because no calculations are performed with incoming ticks. Even with the bar close there is little excitement as recursive formulae are used and calculations are only performed if needed. There are two sources of CPU problems

(a) indicators that need to run in "CalcOnBarClose = False" mode

(b) extensive calculations that are being performed in Plot() also affect the indicators that run in "CalcOnBarClose= true" mode, I have had the case where the Plot() section of a single indicator caused a CPU load of about 30%.

Reply With Quote
The following user says Thank You to Fat Tails for this post:

Reply



futures io > > > > > Reducing CPU load of NinjaTrader

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Am looking for ELCollections.dll that has been modified for multi-threaded cpu's. sigmatrader EasyLanguage Programming 2 August 12th, 2011 06:02 PM
SEC Reducing Market Volitility tdaman News and Current Events 0 April 6th, 2011 03:32 AM
NT 7 & Multicore CPU max-td NinjaTrader 19 January 27th, 2011 07:30 AM
Slippage - need advice on reducing it jackyd Traders Hideout 7 July 6th, 2009 03:24 AM


All times are GMT -4. The time now is 03:29 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-13 in 0.12 seconds with 20 queries on phoenix via your IP 54.226.132.197