Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 frslvr, 04-11-2024, 07:26 AM
    6 responses
    105 views
    1 like
    Last Post NinjaTrader_BrandonH  
    Started by trilliantrader, 04-18-2024, 08:16 AM
    6 responses
    26 views
    0 likes
    Last Post trilliantrader  
    Started by arvidvanstaey, Yesterday, 02:19 PM
    5 responses
    14 views
    0 likes
    Last Post NinjaTrader_Zachary  
    Started by Rapine Heihei, Yesterday, 08:25 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by Mongo, Yesterday, 11:05 AM
    6 responses
    27 views
    0 likes
    Last Post Mongo
    by Mongo
     
    Working...
    X