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 CarlTrading, 03-31-2026, 09:41 PM
    1 response
    41 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    27 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    45 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    37 views
    0 likes
    Last Post CarlTrading  
    Working...
    X