Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Label Lines, Rays

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

    Label Lines, Rays

    Hello,

    there is an indicator in NT-userappshare that labels horizontal lines. Couldn´t find an indicator that labels lines (horizontal with Draw.Line starty=endy) or horizontal rays?


    Thank you!
    Tony

    #2
    Hello tonynt,

    Thanks for your question.

    I have a DrawingTool that expands the built in Lines DrawingTool to add a label. If you want to use them with NinjaScript, you can use DrawLL.LabeledRay() in place of Draw.Ray().

    https://ninjatraderecosystem.com/use...-drawing-tool/

    The link above is publicly available.

    The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.


    We look forward to assisting.

    Comment


      #3
      Hello,

      thank you for your reply. In the meantime I have made a solution with Draw.Text because I know the y-value and I have only a few lines....

      But what I see now when plotting the y-value that there is eg a yvalue1 with 3962,875 in ES as result from "yvalue1 = Instrument.MasterInstrument.RoundDownToTickSize(hi ghtz1+lowtz1)/2;"

      Shouldn´t it be xxxx,00 or 0,25 or 0,50 or 0,75 from this syntax? This is what I thought to get form "Round...TickSize"
      What do I have to change to have xxxx,00 or 0,25 or 0,50 or 0,75 as result?

      Thank you!
      Tony


      Comment


        #4
        Hello tonynt,

        You are adding "lowtz1" and "hightz1" and rounding that to tick size. Then you are dividing that result by 2. The new result is no longer rounded because you divided what was rounded it by 2.

        Did you mean to use parenthesis and divide hightz1 + lowtz1 by 2 before rounding the result?

        We look forward to assisting.

        Comment


          #5
          Hello,

          I mean to get from the high of day and the low of day calculating the "midprice" of day. And the mid should be a "valid" price, therefore roundedtoticksize.

          Is this correct? -->
          yvalue1 = Instrument.MasterInstrument.RoundDownToTickSize((h ightz1+lowtz1)/2);

          Have no "strange" results today, so I can not see by testing.

          Thank you!
          Tony
          Last edited by tonynt; 04-01-2021, 12:27 PM. Reason: Add text

          Comment


            #6
            Hello tonynt,

            Yes, placing the division in the parenthesis of the RoundDownToTickSize() method will have the result of (hightz1+lowtz1)/2 rounded.

            You can also use Median[] or Medians[][] as you would Close[] or Closes[][] to get the median price of a bar.



            Let us know if you have any additional questions.

            Comment


              #7
              This labeled line add-on will NOT save as varying templates. You can save templates with varying settings, but when you load them the saved parameters are not loaded.

              Comment


                #8
                Hello ziponline,

                I've tested saving a template for this drawing tool and I am finding the values are being saved.

                Below is a link to a video of the test.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                556 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                324 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
                545 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                547 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X