Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Colored MA Region - limit bars

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

    Colored MA Region - limit bars

    Applying the SMARegion indicator to color the region uses too many of my computer resources. My question is whether there is anything I can use inside the code to limit coloring the region for let's say only 5, 10 or 20 bars back. If so, how do I do that?

    I ask because I have another indicator in my chart which requires that I load a minimum of 35days. But when I use the SMAregion and it draws 35 days worth of that region, my computer slows down. Plus I don't need to see 35 days back of that region; perhaps only 5 or 10 bars back.

    sandman




    #2
    Hello sandman,

    The way this item works now it uses the Region drawing too so that could add more utilization if it needs to have a long history. In the code now there is not really anything you can change which would help besides preventing it from drawing. The code would need to otherwise avoid using the drawing objects and instead use the Plot override to render this data to gain any kind of performance gain.

    If you only need this in realtime, you may try having it return for historical data that would at the least limit the amount of drawings to what happened in realtime.

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    128 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    73 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    116 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    109 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    88 views
    0 likes
    Last Post CarlTrading  
    Working...
    X