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 SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        50 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        22 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        16 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        22 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        23 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X