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 PhillT, 04-19-2024, 02:16 PM
            4 responses
            32 views
            0 likes
            Last Post PhillT
            by PhillT
             
            Started by ageeholdings, 05-01-2024, 05:22 AM
            5 responses
            36 views
            0 likes
            Last Post ageeholdings  
            Started by reynoldsn, Today, 02:34 PM
            0 responses
            11 views
            0 likes
            Last Post reynoldsn  
            Started by nightstalker, Today, 02:05 PM
            0 responses
            18 views
            0 likes
            Last Post nightstalker  
            Started by llanqui, Yesterday, 09:59 AM
            8 responses
            30 views
            0 likes
            Last Post llanqui
            by llanqui
             
            Working...
            X