Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Label on Price

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

    Label on Price

    I am looking for how to display a label in the price line as on the attached screenshot.

    Thanks for your help.

    #2
    Hello jodu49,

    Thanks for your post.

    This could be accomplished in multiple ways depending on what you would like to accomplish in your script.

    You could consider using AddLine() to draw a line on the chart at a specific price level.

    You could also consider adding a plot to the script using AddPlot() and assigning a value to the plot.

    Or, you could consider using a drawing object, such as Draw.HorizontalLine, to draw a line on the chart at a specified price level.

    See the help guide documentation below for more information and sample code.
    AddLine(): https://ninjatrader.com/support/help...t8/addline.htm
    AddPlot(): https://ninjatrader.com/support/help...t8/addplot.htm
    Draw.HorizontalLine(): https://ninjatrader.com/support/help...zontalline.htm

    Let us know if we may assist further.
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Actually, I'm using Draw.Horizontal, but I'm not getting a price tag.
      This is my code:
      Draw.HorizontalLine(this, Name+"_ZoneDn"+i, false, val, ZoneColor, ZoneStyle, ZoneSize);

      Comment


        #4
        Hello jodu49,

        Thanks for your note.

        After further testing, I see that Draw.HorizontalLine cannot be used to draw a line that displays a price tag on the price axis.

        To accomplish this you would need to add a plot to your script using AddPlot() and assign a value to the plot. Then the plot will appear on the chart with a price tag displayed in the price axis of the chart.

        See the AddPlot() help guide page linked in my previous post and linked below for more information and sample code.

        AddPlot(): https://ninjatrader.com/support/help...t8/addplot.htm

        Let us know if we may assist further.
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment

        Latest Posts

        Collapse

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