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

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 Haiasi, 04-25-2024, 06:53 PM
      2 responses
      17 views
      0 likes
      Last Post Massinisa  
      Started by Creamers, Today, 05:32 AM
      0 responses
      5 views
      0 likes
      Last Post Creamers  
      Started by Segwin, 05-07-2018, 02:15 PM
      12 responses
      1,786 views
      0 likes
      Last Post Leafcutter  
      Started by poplagelu, Today, 05:00 AM
      0 responses
      3 views
      0 likes
      Last Post poplagelu  
      Started by fx.practic, 10-15-2013, 12:53 AM
      5 responses
      5,407 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Working...
      X