Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawText in the middle of the chart window

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

    DrawText in the middle of the chart window

    Is there a way to base DrawText x coordinate not on a number of bars back, but just on the actual visible space, for example, have it always centered in the window, regardless of zoom level. The pivot indicator is an example - the text is always in the same x location as you move the chart back in time.

    Or how can I drawtext in the right margin? Say I have a right side margin of 25, and I'd like to place the text in there? Is there a way to do that? Is there a way to extend a plot line into there as well?

    Thank you
    Last edited by jmflukeiii; 02-04-2012, 10:37 PM.

    #2
    jmflukeiii, that would be unfortunately not possible with our supported draw methods - the Pivot indicator achieves by accessing the unsupported ChartControl methods, you could review it's code for hints in this area.

    Another way is using simply DrawTextFixed, that would offer you 5 predefined locations for your Text object :

    TextPosition.BottomLeft

    TextPosition.BottomRight

    TextPosition.Center

    TextPosition.TopLeft

    TextPosition.TopRight

    Comment


      #3
      I've been trying to decipher that indicator's code, but I think its a bit beyond my grasp.

      The problem, I believe, with the fixed text is an inability to control the y-location. So for example, centered is great, but I'm trying to label lines that the indicator is drawing and the fixed text won't be next to them.

      Thank your for suggestion.

      Comment


        #4
        That's correct, it's really a fixed position by x and y scale means. A line label option is on our suggestion list for future consideration to simplify work in this area.

        Comment

        Latest Posts

        Collapse

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