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

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

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by rene69851, 05-02-2024, 03:25 PM
          2 responses
          28 views
          0 likes
          Last Post NinjaTrader_Kimberly  
          Started by NUVERSA, Today, 09:31 AM
          0 responses
          4 views
          0 likes
          Last Post NUVERSA
          by NUVERSA
           
          Started by ttrader23, Yesterday, 09:04 AM
          8 responses
          37 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by tonynt, Yesterday, 01:48 PM
          2 responses
          12 views
          0 likes
          Last Post tonynt
          by tonynt
           
          Started by goodknight777, Today, 08:43 AM
          1 response
          4 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Working...
          X