Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

move text from left to inside right margin

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

    move text from left to inside right margin

    I have copied the NT7 "Pivots" indicator and amended it to only show the R1,S1 and mid pivots. However, the text is to the left of the lines and over the price bars. How do I move the text to the right side of the lines and away from the price bars (inside the margin)? (Please see screenshot) Thanks.

    Wilson
    Attached Files

    #2
    Hello,

    The area you're looking for is in the #regions Miscellaneous section.

    The exact line is around 508 and reads:

    graphics.DrawString(plot.Name, ChartControl.Font, brush, lastX, lastY - textHeight / 2, stringFormatFar);

    You'll want to change lastX to whichever X value you would like this to plot.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Thanks Matthew for your reply. If I input a value for lastX, say "1500" the letters are placed to the right of the lines like I want, however if I reduce the chart dimensions, the letters are obscured. How can I place the letters at the end of the lines so they remain visable with the lines ?

      Comment


        #4
        Hello Wi!s0n,
        You can use properties exposed by the unsupported ChartControl class to do it. ChartControl.CanvasRight for example will give you the right parameter.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          Thanks Joy, that works best

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          581 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          338 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          554 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          552 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X