Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is it possible to control the "z-order" of elements in an Indicator

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

    Is it possible to control the "z-order" of elements in an Indicator

    Drawing Plots and lines like oscillator line and zero line, is it possible to change the z-axis order so that the zero line is drawn over the oscillator plot?

    #2
    Yes. In State.Configure...
    Code:
    if(ChartBars != null)
    SetZOrder(ChartBars.ZOrder - 1);
    to put indicator output just below the bars.

    Code:
    if(ChartBars != null)
    SetZOrder(ChartBars.ZOrder + 1);
    to put indicator output just above the bars.

    Comment


      #3
      What about in an indicator pane? Same applies? Could not figure out how to apply this in an indicator pane.

      Comment


        #4
        Hello RandyT,

        Thank you for your note.

        If you swap the order you add plot/line in set defaults, do you get the order you desire? You will have to remove and reapply the indicator to reflect the change.

        I look forward to your reply.
        Attached Files
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          I have built a custom indicator based on trade volume and want the amount to be displayed on each bar when the trade value is greater than a certain threshold. This works fine when the indicator is the only item on the chart but when multiple indicators are present the text is not displaying. How do I set the z-order of the indicator so that it is in front of other indicators?

          Comment


            #6
            Hello mballagan,

            Would you be able to provide a screen shot of the issue so I may best assist?

            To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.

            Learn how to use Snipping Tool to capture a screenshot, or snip, of any object on your screen, and then annotate, save, or share the image.


            Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screenshot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

            I look forward to your reply.
            Alan P.NinjaTrader Customer Service

            Comment


              #7
              Customer Indicator Issue

              Attached is a screenshot of the indicator working correctly - it does a volume calculation and displays the value on appropriate bars and color codes the bar. The text in white is simply displayed using DrawText(). When this indicator is put onto a chart with multiple other indicators the text in white is not displaying but the color coded bars (dark green/dark red) are displaying correctly.

              I hope this clarifies the issue.
              Attached Files

              Comment


                #8
                Hello mballagan,

                If you first apply the other indicators then this indicator, does the indicator display correctly?

                I look forward to your reply.
                Alan P.NinjaTrader Customer Service

                Comment


                  #9
                  Customer Indicator Issue

                  Yes applying the indicator last after all other indicators has worked thank you.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by CarlTrading, 03-31-2026, 09:41 PM
                  1 response
                  81 views
                  1 like
                  Last Post NinjaTrader_ChelseaB  
                  Started by CarlTrading, 04-01-2026, 02:41 AM
                  0 responses
                  42 views
                  0 likes
                  Last Post CarlTrading  
                  Started by CaptainJack, 03-31-2026, 11:44 PM
                  0 responses
                  64 views
                  2 likes
                  Last Post CaptainJack  
                  Started by CarlTrading, 03-30-2026, 11:51 AM
                  0 responses
                  68 views
                  0 likes
                  Last Post CarlTrading  
                  Started by CarlTrading, 03-30-2026, 11:48 AM
                  0 responses
                  55 views
                  0 likes
                  Last Post CarlTrading  
                  Working...
                  X