Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

drawtext() question

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

    drawtext() question

    When using DrawText() to print on the price channel, the y position of the text is in price units but the yPixelOffset is in pixels. How do I convert from pixels to price units so that I may instruct DrawText() to always print near the lower edge of the price panel? I onlky want the x position of the text to change from bar to bar.
    Thank you,

    #2
    The pixel offset is meant for fine tuning the position of your text. If you wanted a dash to line up with the current price you would have to offset it a couple of pixels, depending on your font size.
    eDanny
    NinjaTrader Ecosystem Vendor - Integrity Traders

    Comment


      #3
      eDanny,
      Thanks but I want to print near the bottom of the price panel, not at a bar-dependent height. Hence, I must find the proper y and yPixelOffset to print near the bottom.

      Comment


        #4
        You should be using DrawTextFixed() in that case. If you printed text with a large pixel offset to place near the bottom of the chart, as price moves down your text would move below the chart and disappear? If you set it's autoScale to true then your price could be scrunched up sometimes during the bigger moves.
        eDanny
        NinjaTrader Ecosystem Vendor - Integrity Traders

        Comment


          #5
          The problem is DrawTextFixed can only print in five different fixed locations. I onlyt want my y coordinate to be fixed. But the x coordinate must be below the current bar.

          Comment


            #6
            clksoft, I suggest you check into the CustomPlotSample then we provide per default - it shows an example how to override the default plot method.

            Comment


              #7
              Opacity Zero for DrawTextFixed()

              Another question regarding DrawTextFixed: I am using this for error messages. Sometimes several indicators plot the same error message. Opacities add up.

              Solution: Set the opacity of the fill colour to 0. This is not a valid value according to your Help Guide, but it does the trick.

              Can you confirm?

              Comment


                #8
                Hello,

                I will have someone reply to you on Monday. Thank you for your patience.
                DenNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                577 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                334 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
                553 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                551 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X