Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawObjects

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

    DrawObjects

    Hi everyone, I'm working with a custom DOM (Market Depth window), and I draw rectangles method using Draw.Rectangle.

    The issue is that each time Refresh() runs, all existing drawings are removed, and unless the conditions are re-triggered exactly, my rectangles are lost.

    Since the DOM doesn't use OnBarUpdate(), I can't use a more persistent drawing strategy.

    Is there any way to preserve the drawings across Refresh() calls, or re-draw them automatically?

    Here's an example of the code inside Refresh():

    Draw.Rectangle(this, CurrentBar + ".DeepBuyRec", false, 10, Open[0] - TickSize, -200, Close[0] + TickSize, Brushes.Aquamarine, Brushes.Azure, 6);

    Attached Files

    #2
    Hello fersanmito,

    The SuperDOM isn't designed for drawing objects.

    This can show plots from indicators as lines.

    If you have a SuperDOMColumn script you can use the rendering space to custom render WPF shapes.
    Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.


    An example of using the render space can be found in the User App Share.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rajeshks1988, 01-13-2021, 12:00 PM
    10 responses
    1,254 views
    0 likes
    Last Post konganda  
    Started by M_ichel, 04-22-2025, 02:21 PM
    7 responses
    57 views
    1 like
    Last Post brucerobinson  
    Started by michelz, 02-18-2025, 08:30 AM
    33 responses
    1,054 views
    0 likes
    Last Post MiCe1999  
    Started by volIQ, 04-23-2025, 05:43 PM
    4 responses
    38 views
    0 likes
    Last Post volIQ
    by volIQ
     
    Started by algospoke, 04-21-2025, 06:44 PM
    2 responses
    48 views
    0 likes
    Last Post MiCe1999  
    Working...
    X