Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Price label

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

    Price label

    Hi!
    How can I draw a line on a chart and see the label of price on it?
    Thanks

    #2
    Hello maratrm,
    Thanks for writing in and I am happy to assist you.

    You can use the DrawText function along with the DrawLine function to print the price on the chart.

    A basic sample code will be
    Code:
    if (CurrentBar > 20)
    {
    	DrawLine("tag", 20, Close[0], 2, Close[0], Color.Blue);
    	DrawText("str", Close[0].ToString(), 0, Close[0], Color.Blue);
    }
    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Can you explain step by step please

      Comment


        #4
        Hello maratrm,
        To assist you further can you tell me, are you trying to draw the lines by hand/manually or coding it using NinjaScript?

        Please let me know if I can assist you any further.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          I draw the lines by hand/manually

          Comment


            #6
            Hello maratrm,
            Unfortunately while drawing the lines manually the price wont be displayed.

            As an alternative if you are drawing Horizontal lines then you can use the ConstantLine indicator that comes with NinjaTrader. You can draw upto 4 lines with each instances of the ConstantLines indicator. You can use multiple instances of the indicator.

            Please follow the below steps to use the ConstantLine indicator.
            • Right click on the chart.
            • In the context menu click on Indicators….
            • In the Indicator dialog in the left select the ConstantLines indicator in the indicator list.
            • Click on the New button.
            • In the parameters box in the right, set the Line1Value, Line2Value, Line3Value and Line4Value with appropriate values.
            • Click on the Ok button.


            You can also try this indicator which draws the price on Horizontal line http://www.ninjatrader.com/support/f...atid=4&lpage=6

            Please let me know if I can assist you any further.
            JoydeepNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by f.saeidi, Today, 11:02 AM
            1 response
            1 view
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by geotrades1, Today, 10:02 AM
            4 responses
            12 views
            0 likes
            Last Post geotrades1  
            Started by rajendrasubedi2023, Today, 09:50 AM
            3 responses
            15 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by lorem, Today, 09:18 AM
            2 responses
            11 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by geddyisodin, Today, 05:20 AM
            4 responses
            30 views
            0 likes
            Last Post geddyisodin  
            Working...
            X