Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

DrawRegion vs Indicator plot overlaid

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • NinjaTrader_Bertrand
    replied
    Yes, that would be expected unfortunately as you basically created the historical portion with lots of 'mini' draw regions tied together in your old code, you would need to update the current draw region for every bar that the condition is true and so minimize the # of regions used to accomplish this task - a sample technique is shown here - http://www.ninjatrader.com/support/f...ead.php?t=3419

    Leave a comment:


  • buylosellhi
    replied
    now I'm having a different issue - its only plotting a slice of the region for the current bar. I've taken off the "CurrentBar.ToString()" from DrawRegion(...) command so I think its making only one object but how do I see as a region going back all the bars ?
    thanks again for your help...

    Leave a comment:


  • buylosellhi
    replied
    yes, thanks for that.
    just verified it as well - ugh !!

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    Correct, this would create a # of DrawRegions as you use a new tag for each then thus having more and more objects in memory. If you modify this to update the existing one going forward it would be better for your performance.

    Leave a comment:


  • buylosellhi
    replied
    hi Bertrand, thanks for your reply. this may be the reason why my charts are slow and my ninja session under 'Processes' (in Windows Task Manager) seems to 'grow' as the day moves on. Currently, this is how I'm doing it

    if (line1[0]>=line2[0])
    {
    DrawRegion(CurrentBar.ToString()+"Shaded Up",1,0,line1,line2,upColor,upColor,5);
    }

    so does this mean its drawing another region on top of existing regions ?

    Leave a comment:


  • NinjaTrader_Bertrand
    replied
    buylosellhi, adding more visuals with the drawn region would impact performance comparing to plots solely, but as long as you update the newly drawn region using the same tag id, you should be fine.

    Leave a comment:


  • buylosellhi
    started a topic DrawRegion vs Indicator plot overlaid

    DrawRegion vs Indicator plot overlaid

    hi, I'm using DrawRegion to plot a shaded area on my chart the boundaries of which are given by two different Timeseries. Is it significantly more computationally intensive than to use, lets say, just indicator plots ?

    I'm trying to improve the overall performance of my indicator suite and checking everything I can think of.

    thanks in advance for your help

Latest Posts

Collapse

Topics Statistics Last Post
Started by ezrollin, Yesterday, 11:26 PM
1 response
39 views
0 likes
Last Post NinjaTrader_PaulH  
Started by ezrollin, Yesterday, 09:10 PM
1 response
51 views
0 likes
Last Post NinjaTrader_PaulH  
Started by traderhawk, Today, 05:53 AM
0 responses
10 views
0 likes
Last Post traderhawk  
Started by Angus7, Today, 04:31 AM
8 responses
49 views
0 likes
Last Post Angus7
by Angus7
 
Started by aligator, Yesterday, 11:24 PM
0 responses
43 views
0 likes
Last Post aligator  
Working...
X