Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
    BertrandNinjaTrader Customer Service

    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.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by f.saeidi, Today, 08:01 PM
        0 responses
        2 views
        0 likes
        Last Post f.saeidi  
        Started by Rapine Heihei, Today, 07:51 PM
        0 responses
        3 views
        0 likes
        Last Post Rapine Heihei  
        Started by frslvr, 04-11-2024, 07:26 AM
        5 responses
        96 views
        1 like
        Last Post caryc123  
        Started by algospoke, 04-17-2024, 06:40 PM
        6 responses
        49 views
        0 likes
        Last Post algospoke  
        Started by arvidvanstaey, Today, 02:19 PM
        4 responses
        11 views
        0 likes
        Last Post arvidvanstaey  
        Working...
        X