Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawTextFixed and zorder

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

    DrawTextFixed and zorder

    When I use DrawTextFixed, it puts the text on TOP of price bars. I'd like to show the text behind the bars. How can I do this?

    #2
    JoshDance, you should be able to do this programmatically through the IDrawObject interface, as you then can assign a separate ZOrder level for the drawing object, so you could change the level then though the UI on your chart.

    Comment


      #3
      I'm not quite clear on what you're saying -- am I still to use DrawTextFixed? It seems as if the interface just exposes whether the zorder can be changed, and it does not allow it to be set, but maybe I'm wrong on this. Can you show a brief example of drawing fixed text, and then using what you say to make it go to the back of the chart?

      Comment


        #4
        JoshDance, you cannot set an explicit ZOrder to use - you can just set the ZOrder of the object to be separate of the one used for the indicator script -



        Please see the property SeparateZOrder.

        Enhancing ZOrder support via programming is on our list of feedback.

        Comment


          #5
          OK Bertrand, let's approach it this way.

          Here's my code in OnStartUp():

          Code:
          ITextFixed obj = DrawTextFixed("mytext","Test",TextPosition.Center,Color.Gray,new Font("Arial",48),Color.Empty,Color.Empty,5);
          obj.SeparateZOrder = true;
          Yet, I still am unable to select the object. In the chart properties, the properties that allows selection and dragging of objects is enabled.

          What code will accomplish what I want?

          Comment


            #6
            JoshDance, looked further into and checking into with development - I'll repost likely tomorrow on it.

            Comment


              #7
              Originally posted by NinjaTrader_Bertrand View Post
              JoshDance, looked further into and checking into with development - I'll repost likely tomorrow on it.
              Any word on this?

              All I want is to be able to draw fixed text on the center of the chart, behind price bars.

              Comment


                #8
                Thanks for your patience, no update unfortunately yet, I'll be sure to have something for you at least by tomorrow.

                Comment


                  #9
                  Here's the promised update : we clarified and unfortunately a separate ZOrder for DrawTextFixed is not possible as it's differently implemented as other drawing objects we offer and could not be selected individually as object. A workaround would be using the more general DrawText() here.

                  Have a good upcoming weekend,

                  Comment


                    #10
                    Thanks Bertrand. But I hope you guys will add this to your infinitely long list of user requests. The ability to draw text either above or below price bars is pretty much a no-brainer.

                    Comment


                      #11
                      z-order for DrawTextFixed

                      Hi,

                      Further to the below query from a couple of years ago, could you confirm if there has been any further development of Z-order on drawing objects (eg DrawTextFixed) within NT7?

                      I too would like to have the bars appear in front of the text on a chart (programmatically).

                      many thanks!

                      Comment


                        #12
                        Hello Pourleau,

                        Thanks for your reply.

                        There has been no change to this. Any enhancements are being taken into consideration for NinjaTrader 8.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        571 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        330 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        101 views
                        0 likes
                        Last Post Mindset
                        by Mindset
                         
                        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                        0 responses
                        549 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        549 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X