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 charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          68 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          151 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          162 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          100 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          288 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X