Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Printing a new line?

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

    Printing a new line?

    I can't seem to get Print("\n") or Print("\r") working, is there any way to pass strings to the output window with new line or return characters?

    #2
    darckeen,

    You can just use Print(""). That will print a blank space and a new line.

    If you do Print("Test"), this will also move to the next line. I don't believe you need any special carriage return.
    mrlogik
    NinjaTrader Ecosystem Vendor - Purelogik Trading

    Comment


      #3
      I'd like to be able to Print("hello\nworld");
      and have it display:

      hello
      world

      It supposedly works in c# and \t works in NT but \n and \r don't seem to.

      Comment


        #4
        That should do it -

        Code:
         
        Print("Hello" + "\r\nWorld");

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CaptainJack, 05-29-2026, 05:09 AM
        0 responses
        238 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 05-29-2026, 12:02 AM
        0 responses
        154 views
        0 likes
        Last Post CaptainJack  
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        163 views
        1 like
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        246 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        199 views
        0 likes
        Last Post CarlTrading  
        Working...
        X