Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

fixed stacking order in multiple DrawRectangle()

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

    fixed stacking order in multiple DrawRectangle()

    I use multiple DrawRectangle()in one script. There are some overlaping areas, and I don't use Transparent.

    how to make the newer shape and its color always on top of the older ones. it seems to me the stacking order of multiple shapes in a single script is at random by default.

    Thanks
    Last edited by solvmatic; 11-10-2011, 03:40 PM.

    #2
    Hi solvmatic,

    Unfortunately setting Z order for individual objects by code is not available.

    You can structure your rectangles as IDraw objects and set this property:

    SeparateZOrder - This is a bool representing if the draw object is on the same Z-order as the NinjaScript. If this is set to true, you could manually adjust the Z-order of individual rectangles after the object is drawn.

    To adjust the z-order:

    1. Select the chart object by left mouse clicking on it
    2. Hold down the "Shift" key on your keyboard and roll the mouse scroll wheel to change the z-order of the object. The current position out of the total number of levels in the z-scale will be displayed.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    61 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    40 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    21 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    23 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    51 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X