Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Very slow drawing object properties edition on indicator

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

    Very slow drawing object properties edition on indicator

    Recently I migrated a custom indicator from NT7 to NT8. The indicator draws dots above or below the bars of a chart based on some conditions. If I add a chart with a huge amount of data many dots are drawn, so far so good, the problem comes when I add a new drawing object, a text for example, and I try to change its properties, color, font, size, etc. The properties window is very slow in show up and the application of changes to the properties takes too long, which doesnt happens in NT7.

    I am suspecting all the drawning objects (the dots drawn by the indicator and the drawining objects added manually) are loaded in the properties window of every object. You can check this in the attached image to this post, where there are a lot of objects with the tags HighPlot and LowPlot.

    How can I avoid this performance issue?

    #2
    Hello alejandrozuleta,

    Thanks for your post.

    You could consider using SharpDX to draw Ellipses instead of creating numerous Drawing Objects.

    See the attached example scripts demonstrating using OnRender to draw objects and drawing objects with text.

    Also, see the SampleCustomRender indicator that comes default with NinjaTrader for an example of drawing an ellipse using SharpDX. To view the code of the script, open a New > NinjaScript Editor window, open the Indicators folder, and select the SampleCustomRender file.

    And, review the help guide documentation below for more information.

    Using SharpDX for Custom Rendering: https://ninjatrader.com/support/help..._rendering.htm
    RenderTarget: https://ninjatrader.com/support/help...ndertarget.htm
    DrawEllipse(): https://ninjatrader.com/support/help...rawellipse.htm

    Let us know if we may assist further.
    Attached Files
    Brandon H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by jaybedreamin, Today, 05:56 PM
    0 responses
    7 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    18 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Started by Jon17, Today, 04:33 PM
    0 responses
    4 views
    0 likes
    Last Post Jon17
    by Jon17
     
    Started by Javierw.ok, Today, 04:12 PM
    0 responses
    12 views
    0 likes
    Last Post Javierw.ok  
    Started by timmbbo, Today, 08:59 AM
    2 responses
    13 views
    0 likes
    Last Post bltdavid  
    Working...
    X