• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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, 08: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 nailz420, Yesterday, 08:38 AM
    2 responses
    11 views
    0 likes
    Last Post nailz420  
    Started by bouncetherubble, Today, 06:56 PM
    0 responses
    2 views
    0 likes
    Last Post bouncetherubble  
    Started by James108, Today, 06:09 PM
    0 responses
    5 views
    0 likes
    Last Post James108  
    Started by RandanAL, Today, 05:13 PM
    0 responses
    5 views
    0 likes
    Last Post RandanAL  
    Started by timko, Today, 05:06 PM
    0 responses
    6 views
    0 likes
    Last Post timko
    by timko
     
    Working...
    X