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 CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    163 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    81 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    125 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    206 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    184 views
    0 likes
    Last Post CarlTrading  
    Working...
    X