Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SetZOrder

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

    SetZOrder

    In developing an indicator I cam across this behaviour.
    If I set SetZOrder(int.MinValue) in State == State.SetDefaults my chart bars are behind the indicator ( which is a flashing screen).
    If i set it in State == State.DataLoaded - the chartbars are on top of the indicator.

    for me it's better to see the chart bars but just wondered why the different behaviour?


    #2
    Hello Mindset,

    Thank you for your note.

    The help guide section for SetZOrder states that assigning specific ZOrder indices to draw at should be done when the state has reached State.Historical. State.SetDefaults and State.DataLoaded are both reached before State.Historical, so using SetZOrder at those points might yield unexpected results. Additionally, for drawing the object behind the chart bars you should use index -1. I noticed you are using int.MinValue though I do recommend using -1 as noted in the help guide:


    If you are curious and would like to know which index an object is drawn at, you could print the ZOrder property as shown here:


    Please let us know if we may be of further assistance.

    Comment


      #3
      Thanks Emily. It exbibits the same behaviour in Historical but if that's best practice then better to put it there.
      I have always used int.MinValue from back in NT6 days! But I note your advice.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      599 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      344 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
      558 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      557 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X