Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Horizontal line label

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

    Horizontal line label

    Hi,
    I want to add a label to a line that shows what's the last time the price touched the line (see attached example), what is the best to draw this value?

    Thank you.
    Attached Files

    #2
    Hello orenshkol,

    Thanks for your post.

    Can you clarify a bit more?

    Are you wanting to manually add the time price hit the line?

    As an alternative, not quite the same but may be of interest, is the indicator Pricealert indicator (comes with NinjaTrader) that can be added multiple times to a chart and can provide alert(with timestamping) capability. I've created a short video that shows these capabilities. I suspect this may well be an answer for you. http://screencast.com/t/mXoafDVsTLk
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      If you look at the attached file you'll see that I want the number of bars since the last time the price touched the line to show up next to the line. Now I know up to write the logic of how to calculate this value, what I'm interested is how do I draw it on the chart next to the line.
      Attached Files

      Comment


        #4
        Hello orenshkol,

        Thanks for your reply.

        You would use the DrawText() method to draw the the text. Here is a link to the helpguide with example: http://ninjatrader.com/support/helpG.../?drawtext.htm
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Yes, but how do I place on the x-coordinate next to the line in the margin and not on the chart itself?

          Comment


            #6
            Hello,

            Thanks for your reply.

            Although not documented, in NT7, you can use a negative bar number, for example:

            Code:
            if (!Historical)
            			{
            				DrawText ("test", "31", -2, Close[0], Color.Red);
            			}
            The example will draw the number 31 2 bars to the right of the current bar, at its close value (when connected to live data). You may need to add to your right side margin to see this.
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Great, thank you.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Jon17, Today, 04:33 PM
              0 responses
              1 view
              0 likes
              Last Post Jon17
              by Jon17
               
              Started by Javierw.ok, Today, 04:12 PM
              0 responses
              4 views
              0 likes
              Last Post Javierw.ok  
              Started by timmbbo, Today, 08:59 AM
              2 responses
              10 views
              0 likes
              Last Post bltdavid  
              Started by alifarahani, Today, 09:40 AM
              6 responses
              41 views
              0 likes
              Last Post alifarahani  
              Started by Waxavi, Today, 02:10 AM
              1 response
              20 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Working...
              X