Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Draw Text in lower part of indicator bar

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

    Draw Text in lower part of indicator bar

    How can we draw text at the lower side of the indicator panel for every bar?


    Click image for larger version  Name:	image.png Views:	0 Size:	3.0 KB ID:	1305624
    Let around this area.
    Last edited by ttrader23; 05-31-2024, 09:17 AM.

    #2
    Hello ttrader23,

    To draw text on every bar you could use Draw.Text however that requires that you supply a price to draw the text at. If you wanted to draw text based on the charts panel so the text is a fixed offset from the bottom you would need to use OnRender for that purpose. There is a sample of drawing text in the linked page, that would be what is needed to draw text at a X/Y point. To find the x ponts for the bars you can use GetXByBarIndex().



    Comment


      #3
      Sorry This is on the lower indicator panel not the price panel.

      Comment


        #4
        Hello ttrader23,

        That would be the same answer, if you want to use prices for the placement you can use Draw.Text. If you want to offset the text from the chart panel it would require using OnRender. The indicator can be in a sub panel and use either of those concepts.

        Comment


          #5
          Question. So for the Draw.Text parameter on position y would this work?Click image for larger version

Name:	image.png
Views:	107
Size:	1.0 KB
ID:	1305641

          Comment


            #6
            Hello ttrader23,

            Yes you could do that to offset the text from the close price however your indicator would also need to plot the close price so the scale of that panel includes those prices. After doing that the text would appear offset from the bar close prices by 5 ticks.

            Comment


              #7
              But I don't want to use price. I want to use the plot value. When I do that it plots it at the price value.

              Comment


                #8
                Hello ttrader23,

                That is what I had explained in my first reply, if you don't want to use prices for text placement and instead want to use specific X/Y values in the chart you need to use OnRender. You can see a sample of how to draw text from OnRender in the link I had provided.

                Comment


                  #9
                  Ohhh Ok so there is no way to get the value of the plot if it's an indicator to use that as a parameter for the draw.text?

                  Comment


                    #10
                    Hello ttrader23,

                    If you plot a value you could also use that price for the draw text, it doesn't have to be the close price it could be whatever value you wanted to plot. For the draw.text to work it needs to be placed at a price and then the panel its in needs to also be scaled to that price range which a plot would accomplish.

                    Comment


                      #11
                      ok thanks that did work you are the best!

                      Comment

                      Latest Posts

                      Collapse

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