Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Number Formatting in Output Window String

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

    Number Formatting in Output Window String

    I'd like to format an integer to always take 3 characters in a line that is Printed on the Output Window, regardless of its value. This is the script I currently use to Print it on the Output Window line: WMA_NtTot0.ToString(). What are the suggested methods to use to have a "0" take 3 characters, just like "999"?

    #2
    Hi DenMen,

    This post can help with common number formatting:


    This one can help working with strings in general:
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      The first post you listed was particularly useful. I used the the "Phone" example and instead of using the "###" in the example, I used "000" to have "0" to align with "999" in the text of the Ouput window. Thanks for the help!

      Comment


        #4
        Glad you were able to find this formatting option. Thanks for following up here, DenMan.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        65 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        149 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        162 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        99 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        286 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X