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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        169 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        328 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        252 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        353 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        181 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X