Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ZOrder on Plots/Lines?

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

    ZOrder on Plots/Lines?

    My custom indicator has 4 elements, 3 lines and a histogram. Currently the lines are plotted underneath the histogram, I would like them to be on top of the histogram. How is this achieved?

    #2
    Hello,

    Although there is the SetZOrder() helper method available for an entire indicator, there is not a way to set the z-order of individual plots within an indicator via NinjaScript. You should be able to accomplish this by separating the plots you wish to be above the others into a separate indicator, then using SetZOrder() on the two indicators within the same panel.
    Dave I.NinjaTrader Product Management

    Comment


      #3
      Originally posted by funk101 View Post
      My custom indicator has 4 elements, 3 lines and a histogram. Currently the lines are plotted underneath the histogram, I would like them to be on top of the histogram. How is this achieved?
      You could try re-arranging the order in which you add the plots in state.setdefaults.. Add the histo one first and then anything you want on top latter.. The last one added will be on top of all the others and so forth.. This will unfortunately change your values series and you might need additional code changes to accommodate that.. But I believe that should work for you..


      -=Edge=-
      NinjaTrader Ecosystem Vendor - High Tech Trading Analysis

      Comment


        #4
        Originally posted by NinjaTrader_Dave View Post
        Hello,

        Although there is the SetZOrder() helper method available for an entire indicator, there is not a way to set the z-order of individual plots within an indicator via NinjaScript. You should be able to accomplish this by separating the plots you wish to be above the others into a separate indicator, then using SetZOrder() on the two indicators within the same panel.
        Don't like the way that sounds ;-(
        Last edited by funk101; 11-04-2015, 01:32 PM.

        Comment


          #5
          FYI Edge was right, it was the order with which my plots were at. It works like this:
          Values[0] will be below Values[1], etc. So in my case I made the histogram Values[0], [1], [2] and the two lines (which I want on top, and which *used to be* [0] and [1]) are now Values[3] and Values[4]. Now the order is correct.

          Comment


            #6
            indicator plotting above price bars

            I have one indicator which is plotting above or on top of price bars. How do I get it to plot behind price bars? Thanks in advance!

            Comment


              #7
              Originally posted by marci02 View Post
              I have one indicator which is plotting above or on top of price bars. How do I get it to plot behind price bars? Thanks in advance!
              You can manually set the "ZOrder" of an indicator by following the instructions listed here:



              If you are the developer of the indicator, you should be able to use the SetZOrder() method to the desired ZOrder level:

              MatthewNinjaTrader Product Management

              Comment


                #8
                Thanks Matthew!

                Is there a way to setup the ZOrder for Plots in an indicator? For example, the Macd indicator has the Macds, connectors, and bands. How would I get the Macds to plot on top of the connectors and on top of the bands? Is there something else besides the ZOrder to set this up? Thanks!

                Comment


                  #9
                  There is not a way to set the z-order of individual plots within an indicator via NinjaScript
                  MatthewNinjaTrader Product Management

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by TraderG23, 12-08-2023, 07:56 AM
                  9 responses
                  382 views
                  0 likes
                  Last Post Gavini
                  by Gavini
                   
                  Started by oviejo, Today, 12:28 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post oviejo
                  by oviejo
                   
                  Started by pechtri, 06-22-2023, 02:31 AM
                  10 responses
                  125 views
                  0 likes
                  Last Post Leeroy_Jenkins  
                  Started by judysamnt7, 03-13-2023, 09:11 AM
                  4 responses
                  59 views
                  0 likes
                  Last Post DynamicTest  
                  Started by ScottWalsh, Yesterday, 06:52 PM
                  4 responses
                  36 views
                  0 likes
                  Last Post ScottWalsh  
                  Working...
                  X