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