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 SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    42 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    14 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    20 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    22 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X