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 charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    70 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    152 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    162 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    100 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    288 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X