Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to refer to the y value a drawn horizontal line?

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

    How to refer to the y value a drawn horizontal line?

    I have drawn horizonal lines that I need to refer to their y values for using methods such as CrossAbove,etc
    Last edited by Pete77; 06-04-2021, 12:36 PM.

    #2
    Hello Pete77,

    Thanks for your post.

    The easy way would be for your indicator to save the Open price of the 8:30 bar. But I don't know what your subsequent lines are developed from but again if you can pull those from the price data would be the best.

    Otherwise, you can loop through the drawing objects on the chart, find the lines of interest and then pull the Y values of those draw objects.
    Please see the help guide here for an example: https://ninjatrader.com/support/help...rawobjects.htm

    Comment


      #3
      ,I have drawn horizonal lines that I need to refer to their y values for using methods such as CrossAbove,etc. Is this possible?

      Comment


        #4
        Hello Pete77,

        Thanks for your reply.

        Yes, "you can loop through the drawing objects on the chart, find the lines of interest and then pull the Y values of those draw objects.
        Please see the help guide here for an example: https://ninjatrader.com/support/help...rawobjects.htm"

        Comment


          #5

          Thanks for the reply. Glad to hear what I want to do is possible!

          I have been trying to save opening price in a variable "openPrice" but so far no luck.
          I will some more look at the information you gave me




















          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          636 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          366 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          107 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          568 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          571 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X