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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    87 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    133 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    118 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X