Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawText Help wrong

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

    DrawText Help wrong

    DrawText(string tag, bool autoScale, string text, int barsAgo, double y, double yPixelOffset, Color textColor, Font font, StringAlignment alignment, Color outlineColor, Color backColor, int opacity)

    The online v6.5 help says yPixelOffset is a double, but NOT. won't compile unless it is an int.

    Is there a way in OnBarUpdate() to get the Height of a text string in pixels?

    #2
    Thank you for the find.

    Unfortunately we do not support measuring the height of the text string.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks, Josh. I am learning to expect that answer! :-)

      However, your own DrawText function has offset variables in both Ticks & pixels -- so some method of setting these parameters based on the current chart & text string is reasonable - one could even say it would be simple common sense to provide a way to determine these settings via code since you provided them.

      I know this comes up repeatedly from tie to time - please put something in NT7 to address proper positioning in the OnBarUpdate method. It does not make sense to force folks to override the plot everytime when all they want is to position the text one font height away from the bar.

      Comment


        #4
        You Got My Vote !!!!

        Comment


          #5
          Thank you for your input Lost Trader.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          168 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Started by CaptainJack, 04-24-2026, 11:07 PM
          0 responses
          322 views
          0 likes
          Last Post CaptainJack  
          Started by Mindset, 04-21-2026, 06:46 AM
          0 responses
          246 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by M4ndoo, 04-20-2026, 05:21 PM
          0 responses
          350 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Started by M4ndoo, 04-19-2026, 05:54 PM
          0 responses
          179 views
          0 likes
          Last Post M4ndoo
          by M4ndoo
           
          Working...
          X