Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

add text to Constant Line Indicator

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

    add text to Constant Line Indicator

    i'm trying to include a text box that will plot on the same level as the Constant Line Indicator.

    please see attached pic of what the result would look like.

    thanks
    Attached Files

    #2
    Hello,

    You would just draw text on the price value that you use for constant line:


    Price would be the y value in the link above. Give it a try and post your questions and code.
    DenNinjaTrader Customer Service

    Comment


      #3
      it seems that the text does not print when i change the "bars ago" from 0 to 10




      protectedoverridevoid OnBarUpdate()
      {
      if (Line1Value != 0) Line1.Set(Line1Value);
      if (Line2Value != 0) Line2.Set(Line2Value);
      if (Line3Value != 0) Line3.Set(Line3Value);
      if (Line4Value != 0) Line4.Set(Line4Value);

      DrawText(
      "MyText", "Sample text", 10, 1106, Color.Blue);
      }

      Comment


        #4
        Is your current bar check at the OnBarUpdate start high enough to allow for this without errors being thrown to the log tab?

        Comment


          #5
          Does anyone know where I can get such an indi? I like the constant lines indi because I can choose what plot style I want.e.g. dot,cross,triangle, etc.
          Would be great to be able to label the lines, anyone able to do this, please.
          Thanks in advance

          Comment


            #6
            Would unfortunately not be be familiar with a resource providing this already as custom addon study, we have labeling as option though in our feedback tracking in product management and I've added a vote in here on your behalf.

            Comment


              #7
              need help add text to constant lines indi

              Hi, will someone help me out with adding text to the default "constant lines" indicator.
              I was able to make it plot text but I do not know how to tell it what line the text needs to be displayed on. e.g. text for line1, 2, etc. and have that show up in the settings so I can type what text I want when adding the indi to chart.
              Not even sure if the way I got it to add the text is the proper way of doing it. If someone would kindly take a look and give me some direction would appreciate it.
              I attached a pic of the line of code I put in here to make it add the text. Also the original constantlines.cs, and the test .cs i am working on.
              Thanks in advance for any help
              Attached Files
              Last edited by newbie0101; 07-17-2012, 02:31 PM. Reason: added pic of chart

              Comment


                #8
                You could have a look at this indicator, it has user defined lines with alerts.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                571 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                330 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                101 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                548 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                548 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X