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 FrancisMorro, Today, 03:24 AM
            0 responses
            1 view
            0 likes
            Last Post FrancisMorro  
            Started by Segwin, 05-07-2018, 02:15 PM
            10 responses
            1,769 views
            0 likes
            Last Post Leafcutter  
            Started by Rapine Heihei, 04-23-2024, 07:51 PM
            2 responses
            30 views
            0 likes
            Last Post Max238
            by Max238
             
            Started by Shansen, 08-30-2019, 10:18 PM
            24 responses
            943 views
            0 likes
            Last Post spwizard  
            Started by Max238, Today, 01:28 AM
            0 responses
            10 views
            0 likes
            Last Post Max238
            by Max238
             
            Working...
            X