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

Drawing text on chart?

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

    Drawing text on chart?

    Hello there,

    I see a Draw.Text method which seems to be the right method. It is however static, as a new bar is drawn I want to move the Text right one bar (i.e. synced to the last bar.

    I also want to make use of the y-coordinate, which changes from bar to bar.

    Ideally I want to draw at rightmost (- space of the text) and top most of the chart.

    How would I do that?

    Thank you much!

    Caesar

    #2
    Hello Caesar,

    Thank you for your post.

    You have a couple of options here. Based on your description of wanting to draw at rightmost and top most of the chart, it sounds like you might actually want to use Draw.TextFixed() instead with the TextPosition of TextPosition.TopRight:


    If you continue to use Draw.Text() then you could use the same tag and this will continue to modify the object. For example, if you want to keep the text synced up with the right-most bar, you would use a int barsAgo of 0 to keep it on 0 bars ago. You could modify the double y to the desired y value for each bar, though keeping it in the "top most" area of the chart wouldn't be as simple to do with Draw.Text() and is already built in to the Draw.TextFixed() method. Here is the Draw.Text() page for comparison:


    Please let us know if we may be of further assistance.
    Emily C.NinjaTrader Customer Service

    Comment


      #3
      Many Thanks, I'll take a look.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by geddyisodin, 04-25-2024, 05:20 AM
      8 responses
      61 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by jxs_xrj, 01-12-2020, 09:49 AM
      4 responses
      3,288 views
      1 like
      Last Post jgualdronc  
      Started by Option Whisperer, Today, 09:55 AM
      0 responses
      5 views
      0 likes
      Last Post Option Whisperer  
      Started by halgo_boulder, 04-20-2024, 08:44 AM
      2 responses
      22 views
      0 likes
      Last Post halgo_boulder  
      Started by mishhh, 05-25-2010, 08:54 AM
      19 responses
      6,189 views
      0 likes
      Last Post rene69851  
      Working...
      X