Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetZOrder() does it really set ZOrder?

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

    SetZOrder() does it really set ZOrder?


    Z is an int exposed in the UI:
    Code:
    else if (State == State.Historical)
    {
        Print(Core.Globals.Now.ToString("dddd, M/d/yy HH:mm:ss.fff") + " <<< " 
            + Name + " >>> State.Historical. SetZOrder(" + Z + ")") ;
                    
        SetZOrder(Z); // Z = -1 default here is below the bars
                   
        Print(Core.Globals.Now.ToString("dddd, M/d/yy HH:mm:ss.fff") + " <<< " 
            + Name + " >>> State.Historical." 
            + " After SetZOrder(" + Z + ") ZOrder = " + ZOrder ) ;
    }
    Here's the output generated:
    Sunday, 2/12/17 09:50:59.557 <<< MyIndicator >>> State.Historical. SetZOrder(-1)
    Sunday, 2/12/17 09:50:59.557 <<< MyIndicator >>> State.Historical. After SetZOrder(-1) ZOrder = -2
    and
    Sunday, 2/12/17 09:51:08.215 <<< MyIndicator >>> State.Realtime. ZOrder = -2
    Another check of ZOrder in OnRender():
    MyIndicator.OnRender: Current ZOrder level is: 0
    So, my question is this: does SetZOrder() work reliably?

    #2
    Hello tradesmart,

    Thank you for your post.

    The SetZOrder() function should work reliably in these circumstances. Are there any other objects on the chart that can affect the Z Order? Such as indicators, drawing objects, or instruments?

    I look forward to your response.

    Comment


      #3
      Yes, there are other indicators. Does this mean that the ZOrder set via SetZOrder() will be incremented automatically and not stick to the value set?

      Comment


        #4
        Hello tradesmart,

        Thank you for your response.

        That is correct, the ZOrder can change after the indicator is applied. Other objects added to the z scale (indicator plots, drawing objects, etc.) can change the order of the objects.

        Please let me know if you have any questions.

        Comment


          #5
          Thanks for the clarification.

          However, I would prefer that, if I go to the trouble of using SetZOrder(int) in my indicator code, NT8 would respect that and not override my setting. This sort of thing is one of my little pet peeves about NT. I set various attributes (MarketAnalyzer column widths, etc.) only to discover that NT has a mind of its own.

          Comment


            #6
            Hello tradesmart,

            Thank you for your response.

            I will forward your request to development to make the value of SetZOrder a value that cannot be changed by other objects.

            Please let me know if you have any questions.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            597 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            343 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            103 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            556 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            555 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X