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 cmoran13, 04-16-2026, 01:02 PM
        0 responses
        42 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        25 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        162 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        98 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        157 views
        2 likes
        Last Post CaptainJack  
        Working...
        X