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

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?
        BertrandNinjaTrader Customer Service

        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.
            BertrandNinjaTrader Customer Service

            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.

                The best futures trading community on the planet: futures trading, market news, trading charts, trading platforms, trading strategies

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by TradeForge, 04-19-2024, 02:09 AM
                2 responses
                28 views
                0 likes
                Last Post TradeForge  
                Started by aprilfool, 12-03-2022, 03:01 PM
                3 responses
                327 views
                0 likes
                Last Post NinjaTrader_Adrian  
                Started by giulyko00, Today, 12:03 PM
                1 response
                5 views
                0 likes
                Last Post NinjaTrader_BrandonH  
                Started by f.saeidi, Today, 12:14 PM
                1 response
                4 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by AnnBarnes, Today, 12:17 PM
                1 response
                2 views
                0 likes
                Last Post NinjaTrader_Zachary  
                Working...
                X