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 Aviram Y, Today, 05:29 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post Aviram Y  
                  Started by quantismo, 04-17-2024, 05:13 PM
                  3 responses
                  25 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by ScottWalsh, 04-16-2024, 04:29 PM
                  7 responses
                  34 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by cls71, Today, 04:45 AM
                  0 responses
                  6 views
                  0 likes
                  Last Post cls71
                  by cls71
                   
                  Started by mjairg, 07-20-2023, 11:57 PM
                  3 responses
                  217 views
                  1 like
                  Last Post PaulMohn  
                  Working...
                  X