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 zstheorist, Today, 07:52 PM
    0 responses
    3 views
    0 likes
    Last Post zstheorist  
    Started by pmachiraju, 11-01-2023, 04:46 AM
    8 responses
    149 views
    0 likes
    Last Post rehmans
    by rehmans
     
    Started by mattbsea, Today, 05:44 PM
    0 responses
    5 views
    0 likes
    Last Post mattbsea  
    Started by RideMe, 04-07-2024, 04:54 PM
    6 responses
    33 views
    0 likes
    Last Post RideMe
    by RideMe
     
    Started by tkaboris, Today, 05:13 PM
    0 responses
    5 views
    0 likes
    Last Post tkaboris  
    Working...
    X