Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Label in the Right Price Margin

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

    Label in the Right Price Margin

    Is it possible to add a label in the Price Price Panel for the value of a coded drawn horizontal line?

    Example: I draw a line at the high and the low of the previous 30 minutes. I would like to display the Value/Price of the line in the Right Price Panel without using a plot.

    Thank you.


    #2
    Hello nvorves,

    Thanks for your post.

    A plot would be needed to draw on top of the price scale. All custom rendering is clipped to be within the ChartPanel that the indicator owns.

    You could consider drawing a label within the ChartPanel, however. And we do have some tools in the User App Share that can provide this.

    Label Horizontal Lines - https://ninjatraderecosystem.com/use...izontal-lines/

    Labeled Lines Drawing Tool (Supports NinjaScript access with DrawLL.LabeledHorizontalLine) - https://ninjatraderecosystem.com/use...-drawing-tool/

    The links above are 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
      Thank you for your quick response Jim.

      When I use this code:
      protected override void OnRender(ChartControl chartControl, ChartScale chartScale) //section added for Y Axis Plots
      {
      if (Bars == null || ChartControl == null)

      return;
      }

      I am able to draw lines and show plot values without showing the actual plot. However, it seems to hide ALL my plots. Is there a way to apply this kind of thing selectively to individual plots?

      Nick

      Comment


        #4
        Hello nvorves,

        If you do not call base.OnRender() in OnRender(), regular plots will not be drawn in the ChartPanel.

        You could possibly consider using two indicators, where one does not call base.OnRender so plot lines are hidden, and the other shows regular plots.

        Otherwise I would suggest reverting to drawing your own labels within the ChartPanel like what is done with the scripts linked in post #2.

        Let us know if there is anything else we can do to help.

        Comment

        Latest Posts

        Collapse

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