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

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.

    BertrandNinjaTrader Customer Service

    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.
        BertrandNinjaTrader Customer Service

        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.
            BertrandNinjaTrader Customer Service

            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.
                BertrandNinjaTrader Customer Service

                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,
                  BertrandNinjaTrader Customer Service

                  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.
                        BrandonNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by rjbtrade1, 11-30-2023, 04:38 PM
                        2 responses
                        80 views
                        0 likes
                        Last Post DavidHP
                        by DavidHP
                         
                        Started by Spiderbird, Today, 12:15 PM
                        1 response
                        6 views
                        0 likes
                        Last Post NinjaTrader_ChristopherJ  
                        Started by FrazMann, Today, 11:21 AM
                        2 responses
                        6 views
                        0 likes
                        Last Post NinjaTrader_ChristopherJ  
                        Started by lorem, Yesterday, 09:18 AM
                        5 responses
                        18 views
                        0 likes
                        Last Post NinjaTrader_ChelseaB  
                        Started by cmtjoancolmenero, Yesterday, 03:58 PM
                        12 responses
                        42 views
                        0 likes
                        Last Post NinjaTrader_ChelseaB  
                        Working...
                        X