• 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 hincal, Today, 10:07 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_RyanS  
    Started by MIKEALV1975, Yesterday, 07:30 AM
    4 responses
    17 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by shawn9876, Today, 09:07 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by pvtrader, Today, 09:51 AM
    5 responses
    17 views
    0 likes
    Last Post pvtrader  
    Started by andreslazor7, Today, 08:28 AM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Zachary  
    Working...
    X