• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw Line with Label

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

    Draw Line with Label

    Hello,

    I actually have two questions about Draw objects:

    1. Is it possible to draw a line segment over the right-most N bars of the chart so that is continually moves as the day progresses? For example, I want to draw a line at a price of 45.50 such that it displays over the last 10 bars, but continues to be extended as the trading day passes.

    My thought for doing this was to use the DrawLine method and, at every bar, remove and redraw the Draw object. This seems inefficient and I wondered if there was a better way.

    2. Can a label or text box be added to the line above so that it always appears at the right-most edge of the Line object?

    Thank you.

    #2
    Hello ivb73077,

    Thank you for your inquiry.

    1. You would be able to call the DrawLine() method call with the same tag and it will modify the previous line for you with your new parameters.

    2. You can use the DrawText() method call to draw text at a particular point specified. What you could do is access the line in the DrawObjects collection and access its parameters for use in your DrawText() as well.

    Please take a look at these links to the NinjaTrader help guide for more information about DrawText() and DrawObjects: http://ninjatrader.com/support/helpG.../?drawtext.htm
    http://ninjatrader.com/support/helpG...rawobjects.htm

    Please, let us know if we may be of further assistance.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      This should work. Thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Emma1, Today, 02:42 PM
      1 response
      16 views
      0 likes
      Last Post NinjaTrader_DrewO  
      Started by fx.practic, Today, 03:10 PM
      1 response
      5 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by jertrade, Today, 02:50 PM
      2 responses
      11 views
      0 likes
      Last Post jertrade  
      Started by RedDuke, Today, 01:59 PM
      1 response
      19 views
      0 likes
      Last Post NinjaTrader_Kate  
      Started by MarianApalaghiei, Today, 01:18 PM
      1 response
      16 views
      0 likes
      Last Post NinjaTrader_PatrickG  
      Working...
      X