• 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 wishing, 07-19-2019, 03:33 PM
    1 response
    25 views
    0 likes
    Last Post NinjaTrader_PatrickG  
    Started by Venom, Yesterday, 01:05 PM
    1 response
    20 views
    0 likes
    Last Post NinjaTrader_ChrisSch  
    Started by thgamey, Today, 02:05 AM
    2 responses
    14 views
    0 likes
    Last Post thgamey
    by thgamey
     
    Started by yeshujbp, Yesterday, 02:40 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by sardana, Today, 05:52 AM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Working...
    X