Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Right Justify

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

    Right Justify

    Gents
    This is a pretty simple question but I can't find the answer

    I have this code:
    DrawTextFixed("TL",""
    +" Session Open" +open.ToString("F2").PadLeft(15) +"\n"
    +" Session High" +hi.ToString("F2").PadLeft(16) +"\n"
    +" Session Low" +lo.ToString("F2").PadLeft(17) +"\n"
    ,TextPosition.TopLeft);

    .PadLeft leaves the charachters just slightly mis-aligned, maybe due to the font particulars of the font (?)

    I would like to right justify the output - within whatever context DrawTextFixed uses to determine the right edge of the output.



    Is there a way to do this?
    Thanks


    #2
    Unfortunately when using DrawTextFixed() your method is going to be the best way I'm aware of for aligning the Text.

    If you wanted to display text aligned in a different manor you would have to override Plot()

    An example of getting started with this would be the system standard Pivots indicator. However we won't be able to provide support if going the route.
    LanceNinjaTrader Customer Service

    Comment


      #3
      Okey Dokey
      Thanks
      (never hurts to ask!)

      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
      337 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