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 pecunianonolet, 11-28-2016, 03:34 AM
          5 responses
          4,510 views
          0 likes
          Last Post Futurestrader00  
          Started by reynoldsn, Today, 07:23 AM
          4 responses
          9 views
          1 like
          Last Post reynoldsn  
          Started by bee1943, Today, 09:55 AM
          1 response
          13 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by FAQtrader, 04-25-2024, 12:00 PM
          7 responses
          103 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by giulyko00, Yesterday, 11:49 AM
          4 responses
          28 views
          0 likes
          Last Post giulyko00  
          Working...
          X