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

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 jaybedreamin, Today, 05:56 PM
                  0 responses
                  3 views
                  0 likes
                  Last Post jaybedreamin  
                  Started by DJ888, 04-16-2024, 06:09 PM
                  6 responses
                  18 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by Jon17, Today, 04:33 PM
                  0 responses
                  1 view
                  0 likes
                  Last Post Jon17
                  by Jon17
                   
                  Started by Javierw.ok, Today, 04:12 PM
                  0 responses
                  6 views
                  0 likes
                  Last Post Javierw.ok  
                  Started by timmbbo, Today, 08:59 AM
                  2 responses
                  10 views
                  0 likes
                  Last Post bltdavid  
                  Working...
                  X