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() improvement request - anchoring at the bottom

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

    DrawText() improvement request - anchoring at the bottom

    I have an often recurring problem where I place multi-line text above a bar (using DrawText) and would like to keep it just above the bar regardless of the y range of the chart. Since DrawText anchors the text at the top of the specified Y value, I have to pick a Y value that is above the bar and high enough so that all lines of text are above the price bar. The problem is that when you scroll the chart left and right, the displayed Y range changes and the text will move drastically, from covering the bar (which I don't want; this happens when the chart's displayed Y range is large - during high volatility) to being so high above the bar that it is way off the chart and thus not visible (which I also don't want; this happens when the chart's displayed Y range is small - during low volatility).

    I tried to get around this by choosing a Y value based on the chart's displayed Y range up to that point, but this often makes the problem worse because volatility, and thus the chart's displayed Y range, often changes and the nicely positioned text will suddenly move off the chart or over the bar as the chart moves or scrolls.

    The only solution as far as I can tell is for NinjaTrader to add the capability to anchor text at the bottom of the text in addition to what it currently does, which is anchoring at the top. If you do this, which I sincerly hope that you do, you will probably want to do it via adding an extra argument to the DrawText() method. This way you can always add other anchoring options (now or in the future) for anchoring in other spots too (for example: left, right, center). You may also want to consider adding a pixel offset argument so that you could, for example, keep the text consistently 7 pixels above the price bar.

    Thanks!

    #2
    NT 6.5 has a new DrawTextFixed() method that may be what you are looking for.
    RayNinjaTrader Customer Service

    Comment


      #3
      Hi Ray,

      I made this same request to your people at the Trader's Expo in Las Vegas a few weeks ago and they mentioned that they believed that my request had already been added to 6.5. So when I got home, I found DrawTextFixed() and have been using it since then. However, it is a totally different (but very useful) text drawing method. It draws text in a box in one of the corners of a chart, but has nothing to do with drawing text relative to specific bars, which is what DrawText does. So, no, it appears that the functionality that I have requested has not been added yet. It would be very nice to have as it would make my charts much more readable.

      Thanks!

      Comment


        #4
        Got it, I see what you are after. I will add this as a request for possible future enhancement.
        RayNinjaTrader Customer Service

        Comment


          #5
          Hello,

          I would suggest NinjaTrader add more drawText options similar to those in eSignal's EFS, such as drawing texts relative to the left size of the chart, to the top/bottom of the chart, drewing texts at relative position or at absolute position, etc.

          - Clearpicks

          Comment


            #6
            Thanks clearpicks. We will add it to the list of future considerations.
            Josh P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by jaybedreamin, Today, 05:56 PM
            0 responses
            3 views
            0 likes
            Last Post jaybedreamin  
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            18 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Jon17, Today, 04:33 PM
            0 responses
            1 view
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            6 views
            0 likes
            Last Post Javierw.ok  
            Started by timmbbo, Today, 08:59 AM
            2 responses
            10 views
            0 likes
            Last Post bltdavid  
            Working...
            X