Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

onbarudpate drawregion

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

    onbarudpate drawregion

    Initially posted something in platform section and was asked to post here - was noticing chart responsiveness issues and reviewing the indicators on chart.
    I had indicator using drawregion - which was almost every other bar to draw an area for attention. So all the history would have been affected.

    update - did some testing and removed the region drawing indicator - was fairly straightforward - calculated on bar close (ie not tick or price change) using the onbarupdate method.
    Made big difference to responsiveness of chart. I can always post in indicator section but this is more a platform issue than indicator specific i would have thought.
    If i get chance may do an onrender version of this drawing regions to see if performs better. But to me this points to handling of drawing objects which seems to be slow in ninja in general since NT8 launch.

    Out of interest would doing the same in OnRender improve performance ? Obviously ninja provides onbarupdate draw methods for programmers who dont know or want to use the more complex onrender process. Any comments on the above and why drawregion would incur a high cost and affect chart responsiveness from the drawing ?

    thanks

    #2
    Hi soulfx, thanks for your question.

    A high number of drawing objects will cause performance problems. In the OnRender method you have the ability to only render on the visible bars and gives max amount of control over what to render and when. I attached a general example of using the OnRender method.

    Please let me know if I can assist any further.
    Attached Files

    Comment


      #3
      Thanks for sharing - I guess I wanted to understand more on and confirm that in using onbarupdate draw methods which iterates through all the days loaded (history) - that this can and will typically incur a higher drawing object overhead vs onrender. i know how to use onRender i was just enquiring more on the onbarupdate methods.
      Do you have an equivalent of draw region using onrender methods sharpdX style ?
      thanks

      Comment


        #4
        Hi soulfx, thanks for your reply.

        The Region or Region Highlight script in the drawing tools folder performs the render in the OnRender method, that would be the best example. Note that if the system is rendering a large number of objects to the chart in one OnRender call there will be an expected performance hit to the system.

        Please let me know if I can assist any further.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        596 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        343 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        556 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        554 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X