Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ZOrderType is not always working

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

    ZOrderType is not always working

    Hello,

    I would like my custom drawings tools to be drawn behind bars so I set
    Code:
    ZOrderType[COLOR=#ffffff] [/COLOR]= DrawingToolZOrder.AlwaysDrawnFirst;
    inside
    Code:
    State.SetDefaults
    but I noticed it doesn't work for all my drawing tools. So I tried this on
    Code:
    @Lines.cs
    and indeed it doesn't work for Line, ArrowLine and Horizontal Line but it works for Ray, Extended Line and Vertical Line.

    Do you know what's happening here? Thanks

    #2
    Hello beobast,

    Do you have a sample drawing object where you see this happening that you can attach? I tried the following and see this drawing behind the bars when I draw it. Are there other steps required to see it not drawn first?

    Code:
    namespace NinjaTrader.NinjaScript.DrawingTools
    {
    public class TestLine : Line
    {
        protected override void OnStateChange()
       {
          base.OnStateChange();
          if (State == State.SetDefaults)
          {
             LineType = ChartLineType.ArrowLine;
             Name = "ElLine";
             ZOrderType= DrawingToolZOrder.AlwaysDrawnFirst;
          }
       }
    }
    }
    marcus2300, is your problem specifically related to using AlwaysDrawnFirst in your custom drawing object? If this relates to the series and not specifically a custom drawing object using AlwaysDrawnFirst I would suggest making a new post or use the post you linked so we can assist you with that separately.


    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    576 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    334 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    553 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    551 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X