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 AaronKoRn, Today, 09:49 PM
      0 responses
      1 view
      0 likes
      Last Post AaronKoRn  
      Started by carnitron, Today, 08:42 PM
      0 responses
      6 views
      0 likes
      Last Post carnitron  
      Started by strategist007, Today, 07:51 PM
      0 responses
      8 views
      0 likes
      Last Post strategist007  
      Started by StockTrader88, 03-06-2021, 08:58 AM
      44 responses
      3,975 views
      3 likes
      Last Post jhudas88  
      Started by rbeckmann05, Today, 06:48 PM
      0 responses
      9 views
      0 likes
      Last Post rbeckmann05  
      Working...
      X