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

drawLine function

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

    drawLine function

    hi,

    i want to draw a line on the chart panel. i use the DrawLine() function. but, this function needs y axis co-ordinate. That means i need to convert the price to a y axis co-ordinate value.

    Do you have function that can just take the price value and draw a line on the chart?

    Plot function is not an option because i need to delete the line later and plot object can not be deleted.

    #2
    Hi AutoTraderOne,

    What is the context that you will be placing the DrawLine on the chart panel?

    What I mean is what kind of value are you wanting to pass through the DrawLine()?
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      I believe for the standard supported draw objects the y-axis value is input as price. For example, if you want the line to draw at the level of the last bar's closing price your y value would be Close[1].

      hth

      Comment


        #4
        thank you for helping. It is my mistake. DrawLine did take price value as input.

        Comment


          #5
          Having trouble with DrawLine()

          I cant seem to get the drawline function to work on my RSI, any help>> or example, thanks

          Comment


            #6
            Hello dv1234567,

            Thanks for your post and welcome to the forums!

            The help guide provides an example of DrawLine: http://www.ninjatrader.com/support/h...l?drawline.htm

            If you are trying to draw a line in an indicator panel, then you will also want to make sure that you set DrawOnPricePanel = false; as the default is true. Please see: http://www.ninjatrader.com/support/h...pricepanel.htm

            Please let me know if I can be of further assistance.
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Please Help

              I am trying to get the DrawLine() to draw lines on the price chart and on the indicator panel at the same time, whenever i mess with DrawOnPricePanel = false, all the lines everywhere dissappear, any ideas, thanks

              Comment


                #8
                Hello,

                This would not be possible from a single indicator.

                DrawOnPricePanel toggles if the indicator will draw on the price panel or on the panel the indicator is currently in.

                In order to draw on multiple panels, there is the option of two indicators, one set to the price panel and the second set to its own panel.

                I look forward to being of further assistance.
                JesseNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by RookieTrader, Today, 09:37 AM
                3 responses
                14 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by kulwinder73, Today, 10:31 AM
                0 responses
                5 views
                0 likes
                Last Post kulwinder73  
                Started by terofs, Yesterday, 04:18 PM
                1 response
                23 views
                0 likes
                Last Post terofs
                by terofs
                 
                Started by CommonWhale, Today, 09:55 AM
                1 response
                3 views
                0 likes
                Last Post NinjaTrader_Erick  
                Started by Gerik, Today, 09:40 AM
                2 responses
                7 views
                0 likes
                Last Post Gerik
                by Gerik
                 
                Working...
                X