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 zstheorist, Today, 07:52 PM
        0 responses
        6 views
        0 likes
        Last Post zstheorist  
        Started by pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        150 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Started by mattbsea, Today, 05:44 PM
        0 responses
        6 views
        0 likes
        Last Post mattbsea  
        Started by RideMe, 04-07-2024, 04:54 PM
        6 responses
        33 views
        0 likes
        Last Post RideMe
        by RideMe
         
        Started by tkaboris, Today, 05:13 PM
        0 responses
        6 views
        0 likes
        Last Post tkaboris  
        Working...
        X