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

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

    Paul H.NinjaTrader Customer Service

    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"
        Paul H.NinjaTrader Customer Service

        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 anton_tymoshchuk, Yesterday, 01:14 AM
          4 responses
          24 views
          0 likes
          Last Post anton_tymoshchuk  
          Started by percy3687, Today, 12:28 AM
          0 responses
          4 views
          0 likes
          Last Post percy3687  
          Started by sofortune, Yesterday, 11:45 PM
          1 response
          5 views
          0 likes
          Last Post sofortune  
          Started by zzeric, Yesterday, 11:23 PM
          1 response
          5 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by Pep de lou, Yesterday, 08:14 PM
          2 responses
          21 views
          0 likes
          Last Post bltdavid  
          Working...
          X