Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw Objects z-order not honored

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

    Draw Objects z-order not honored

    Consider the following setups:

    Setup 1:
    1. At BarsInProgress = 0, CurrentBar = 179
      • DrawDot() is run first.
      • DrawDiamond() next.
    2. Conclusion - Correct observation - Diamond overlays Dot (Figure 1)

    Click image for larger version

Name:	Figure 1.jpg
Views:	1
Size:	41.4 KB
ID:	900891

    Setup 2:
    1. At BarsInProgress = 0, CurrentBar = 179
      • DrawDot() is run first.
      • DrawDiamond() next.
    2. At BarsInProgress = 0, CurrentBar = 180
      • DrawDiamond() is run.
    3. Conclusion - Correct observation - Diamond overlays Dot at Bar 179 still. (Figure 2)

    Click image for larger version

Name:	Figure 2.jpg
Views:	1
Size:	42.9 KB
ID:	900892

    Setup 3:
    1. At BarsInProgress = 0, CurrentBar = 179
      • DrawDot() is run first.
      • DrawDiamond() next.
    2. At BarsInProgress = 0, CurrentBar = 180
      • DrawDiamond() is run.
    3. At BarsInProgress = 0, CurrentBar = 182
      • DrawDot() is run.
    4. Conclusion - Incorrect observation - Dot overlays Diamond at Bar 179. (Figure 3)

    Click image for larger version

Name:	Figure 3.jpg
Views:	1
Size:	45.1 KB
ID:	900893



    To reproduce this observation:
    1. Create a new Indicator
    2. In OnBarUpdate(), write the necessary draw statements


    I attached the CS file for reference. ADebug.cs

    Can anyone explain why is this happening?
    Thank you.
    Last edited by thepianok2FaHSK5xHXU; 03-03-2014, 07:10 PM.

    #2
    Welcome to the forums and thanks for the detailed report - this would be unfortunately expected since the drawn object types would share the same zorder level, so if you for example later draw another diamond that could change the previous zorder level of the diamonds. You can verify this on your setup be selecting a drawing object, holding Shift pressed and go through availabel zorder levels via your mousewheel. This is on developments list to review for our next major version update.
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Natoc, Today, 03:04 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by Rudy2323, Today, 02:56 AM
    1 response
    16 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by tonynt, Yesterday, 02:07 PM
    1 response
    29 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by sgordet, Yesterday, 01:57 PM
    1 response
    30 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by PeterInBrisbane, Yesterday, 01:07 AM
    2 responses
    25 views
    0 likes
    Last Post PeterInBrisbane  
    Working...
    X