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 sjsj2732, Yesterday, 04:31 AM
                0 responses
                35 views
                0 likes
                Last Post sjsj2732  
                Started by NullPointStrategies, 03-13-2026, 05:17 AM
                0 responses
                287 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                286 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                133 views
                1 like
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                92 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Working...
                X