Dark Theme
Light Theme
Trading Articles
Article Categories
Article Tools
Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to
register in order to view the content of the threads and start contributing to our community.
It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Updated November 8, 2011
Top Posters
looks_one
Fat Tails
with 14 posts (17 thanks)
looks_two
aslan
with 5 posts (5 thanks)
looks_3
Big Mike
with 3 posts (0 thanks)
looks_4
Tarkus11
with 3 posts (2 thanks)
Best Posters
looks_one
RJay
with 3 thanks per post
looks_two
Fat Tails
with 1.2 thanks per post
looks_3
aslan
with 1 thanks per post
looks_4
Tarkus11
with 0.7 thanks per post
trending_up
16,633 views
thumb_up
29 thanks given
group
7 followers
forum
37 posts
attach_file
3 attachments
August 15th, 2011, 08:08 AM
Bala, PA, USA
Experience: Intermediate
Platform: NinjaTrader
Broker: Mirus, IB
Trading: SPY, Oil, Euro
Posts: 1,854 since Jul 2010
Thanks Given: 300
Thanks Received: 3,373
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.
August 15th, 2011, 05:51 PM
Manta, Ecuador
Site Administrator Developer Swing Trader
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,543 since Jun 2009
Thanks Given: 33,290
Thanks Received: 101,796
gkinlaw
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
November 5th, 2011, 08:43 PM
Salt Lake City, UT
Experience: Intermediate
Platform: SC, NT, MT
Broker: AMP
Trading: NQ ES YM Bonds
Posts: 265 since Mar 2010
Thanks Given: 50
Thanks Received: 387
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.
November 6th, 2011, 05:03 AM
Berlin, Europe
Market Wizard
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103
tulanch
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
November 6th, 2011, 04:53 PM
Salt Lake City, UT
Experience: Intermediate
Platform: SC, NT, MT
Broker: AMP
Trading: NQ ES YM Bonds
Posts: 265 since Mar 2010
Thanks Given: 50
Thanks Received: 387
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?
November 6th, 2011, 06:54 PM
Berlin, Europe
Market Wizard
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103
tulanch
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:
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.
November 7th, 2011, 09:44 AM
Hartford, CT. USA
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
Posts: 683 since Jun 2009
Thanks Given: 759
Thanks Received: 787
tulanch
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
November 8th, 2011, 09:26 AM
Salt Lake City, UT
Experience: Intermediate
Platform: SC, NT, MT
Broker: AMP
Trading: NQ ES YM Bonds
Posts: 265 since Mar 2010
Thanks Given: 50
Thanks Received: 387
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..
Last Updated on November 8, 2011