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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        67 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        59 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X