Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Update ZOrder dynamically

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

    Update ZOrder dynamically

    Hi, I have an indicator which does some plotting over the price chart. I need to give the user the possibility to have all such drawings drawn in front of candlesticks or on the back of them by clicking on a context menu entry that I have already coded. In the body of the indicator when I call SetZOrder(-1) or SetZOrder(10) I do not see any effect, like it is not working. It's very likely that I am doing something wrong.. how can get this dynamic change of zorder take place within a callback method associated to context menu click?

    Note: if i implement this option as an indicator input and set it in the State.Historical as suggested by the documentation everything works as expected. However I need to set it as described above.

    Thank you in advance!
    Have a nice day

    #2
    Hmm, the docs do say,

    "Assigning specific ZOrder indices to draw at should be
    done once the State has reached State.Historical​."

    So ... sounds like your indicator is working as well as
    can be expected.

    Comment


      #3
      Sure, thank you for your feedback!

      I am asking because I have seen indicators for NT8 which actually implement exactly what I described. So I believe there is a way to do such thing (which maybe goes beyond having only that setting as input). I am wondering if is there any way to get that behavior.

      Thank you in advance,
      Best regards

      Comment


        #4
        Hello VFI26,

        Thank you for your post.

        The phrasing on the Help Guide may be confusing. It would be better to say SetZOrder() can be called upon reaching State.Historical, so not just one time, but after that state has been reached.

        I would recommend making a public int that could be used for the user defined parameter. Please see the Help Guide page below on creating user defined parameters:



        Please let me know if you have any further questions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        574 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        333 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X