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

  #31 (permalink)
Elite Member
Bala, PA, USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Mirus, IB
Favorite Futures: SPY, Oil, Euro
 
monpere's Avatar
 
Posts: 1,858 since Jul 2010
Thanks: 300 given, 3,276 received

What I do for some of indicators is, I skip some cpu intensive logic if appropriate, when new bars start printing less then 1-3 seconds apart. In some indicators I only call draw methods or certain calculation methods, only when the chart is scrolled horizontally, or the scale changes vertically, or sometimes only if the chart is visible, depending on what the code does.


Last edited by monpere; August 15th, 2011 at 10:47 AM.
Reply With Quote
The following user says Thank You to monpere for this post:
 
  #32 (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,240 since Jun 2009
Thanks: 29,352 given, 83,233 received


gkinlaw View Post
Here's an image of the task mgr with 2 cpu's running, I get spike's now instead of capping off at 25%. Also yesterday I found that I was recording data in Jan 1. and I cut that off. Bet that used up some cpu.

thanks for you replies!!

Your image did not come through. Click on the word screenshot in my post to learn how to attach images.

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
 
  #33 (permalink)
Elite Member
Salt Lake City, UT
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Dormans/Zen-fire
Favorite Futures: 6E ES YM
 
Posts: 233 since Mar 2010
Thanks: 46 given, 321 received

DrawRegion is a CPU pig!


bottom line DrawRegion is a CPU pig 256 bars or not

from Windows Resoure Monitor, CPU spike graphs ok, plateaued CPU mesa graphs bad

all I am doing is filling the area between +-2 tick offset of EMA. I ended up creating 2 new datasets to make use of DrawRegion.

I added a parm that if ture use DrawRegion if false use BackGround=color.touse

night and day difference....

while the filled regions looks kwel... I can not afford the CPU hit

to me boils down to form over function, I choose function.

Reply With Quote
 
  #34 (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,601 received
Forum Reputation: Legendary


tulanch View Post
bottom line DrawRegion is a CPU pig 256 bars or not

from Windows Resoure Monitor, CPU spike graphs ok, plateaued CPU mesa graphs bad

all I am doing is filling the area between +-2 tick offset of EMA. I ended up creating 2 new datasets to make use of DrawRegion.

I added a parm that if ture use DrawRegion if false use BackGround=color.touse

night and day difference....

while the filled regions looks kwel... I can not afford the CPU hit

to me boils down to form over function, I choose function.

Depends on how you coded it. The impact on the CPU depends on

-> how many regions you draw, if you draw from CurrentBar to CurrentBar - 1, this is the worst solution
-> whether you perform the calculations with each incoming tick or only with the first tick of a bar

Reply With Quote
 
  #35 (permalink)
Elite Member
Salt Lake City, UT
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Dormans/Zen-fire
Favorite Futures: 6E ES YM
 
Posts: 233 since Mar 2010
Thanks: 46 given, 321 received

Curious other ways to do this...

I'm doing bar close... not every tick...

ultimately goal is to fill area between 9ema 30wma red fill area when 30 on top, green if on bottom...pull back area reminder...

how can one do this other than current bar to current bar - 1 ?

perhaps keep growing the area till it changes ie current bar to current-n thus making 1 region instead of n regions?


other ideas/concepts?

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,601 received
Forum Reputation: Legendary


tulanch View Post
I'm doing bar close... not every tick...

ultimately goal is to fill area between 9ema 30wma red fill area when 30 on top, green if on bottom...pull back area reminder...

how can one do this other than current bar to current bar - 1 ?

perhaps keep growing the area till it changes ie current bar to current-n thus making 1 region instead of n regions?

There is a coding example here, how to do it:

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

But then you should run it in CalculateOnBarClose = true mode. If you want to use the indicator in CalculateOnBarClose = false mode, you should probably select a displacement of 1.

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #37 (permalink)
 Vendor: www.innovative-trading-solutions-online.com 
Hartford, CT. USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: AMP/CQG, Kinetick
Favorite Futures: TF
 
RJay's Avatar
 
Posts: 677 since Jun 2009
Thanks: 726 given, 740 received


tulanch View Post
bottom line DrawRegion is a CPU pig 256 bars or not

from Windows Resoure Monitor, CPU spike graphs ok, plateaued CPU mesa graphs bad

all I am doing is filling the area between +-2 tick offset of EMA. I ended up creating 2 new datasets to make use of DrawRegion.

I added a parm that if ture use DrawRegion if false use BackGround=color.touse

night and day difference....

while the filled regions looks kwel... I can not afford the CPU hit

to me boils down to form over function, I choose function.

Hi tulanch,

I use draw region a lot. Try changing historic load setting from days to bars and only load 200 to 500 bars.

Also, remember historic data stored in NT must be manually deleted.

Same is true with market replay.

If you have not done this cleanup in a while, if ever. Take the time to streamline NT.

That helps NT run without dragging all that old data around.

Lastly, Templates. If you have like 50 templates loaded, move or delete out the ones you are not using.

Templates may be running all the time even when when not loaded to charts.

This puts a huge load on the CPU.

Lastly, do a repair database in NT to compact data.

RJay

Reply With Quote
The following 3 users say Thank You to RJay for this post:
 
  #38 (permalink)
Elite Member
Salt Lake City, UT
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Dormans/Zen-fire
Favorite Futures: 6E ES YM
 
Posts: 233 since Mar 2010
Thanks: 46 given, 321 received

WOW! huge, did I say HUGE difference.....

1.) had it measured in days, now using bars
2.) had 15 templates...removed all but the current

lightning fast now.... can not even tell I pressed F5

thanks again..

Reply With Quote

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)

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
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 06:57 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-14 in 0.12 seconds with 20 queries on phoenix via your IP 54.226.227.175