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
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    85 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    47 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    29 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    67 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X