Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
        Gaby V.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by poplagelu, Today, 05:00 AM
        0 responses
        3 views
        0 likes
        Last Post poplagelu  
        Started by fx.practic, 10-15-2013, 12:53 AM
        5 responses
        5,407 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by Shai Samuel, 07-02-2022, 02:46 PM
        4 responses
        98 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by DJ888, Yesterday, 10:57 PM
        0 responses
        8 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by MacDad, 02-25-2024, 11:48 PM
        7 responses
        160 views
        0 likes
        Last Post loganjarosz123  
        Working...
        X