Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bookmap style heatmap

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

    Bookmap style heatmap

    I'm trying to build out a Bookmap style heatmap as an NT8 indicator. This is primarily to support Rithmic level ii data with the full DOM so a lot of market levels. I'm doing this by drawing a rectangle using SharpDX for each price level every two seconds. I am reusing the SharpDX brushes as recommended. I'm literally drawing probably tens of thousands if not hundreds of thousands of little rectangles on the chart. After a while with a lot of the rectangles drawn or If I zoom out the focus I'm finding the charts lock up. My question is, is this simply not going to be possible with NinjaTrader 8 and should I just give up the attempt? Is there a limit to the amount of tiny rectangles I can draw even using all of the techniques recommended for SharpDX? If I were to zoom way out on a 1 second chart and have millions of these rectangles is NT8 not going to be able to handle that? Thanks
    Last edited by gspaulding; 03-20-2023, 02:34 PM.

    #2
    Hello gspaulding,

    Thank you for your post and welcome to the NinjaScript forum community!

    There are some best practices for SharpDX resources. For example, for any device-dependent resources, the objects should be created and disposed of any time the RenderTarget is updated. Zooming in/out of a chart counts as updating the RenderTarget, so it sounds like this might be having a performance impact. The SharpDX best practices are listed here:


    We also have some general NinjaScript performance best practices listed here:


    I suggest taking a look at those pages and seeing if any of those best practices apply to your script.

    If you have any additional questions or concerns, please let me know.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    549 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    549 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X