Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Print several variables in one line

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

    Print several variables in one line

    Hello, just a quick question: Is there a possibility to print several variables in one line in the output windows?

    e.g.

    2014/08/18 smaSlow 154,55 smafast 156,77
    2014/08/19 smaSlow 156,55 smafast 154,77
    ...

    Thanks

    #2
    Originally posted by phadreus View Post
    Hello, just a quick question: Is there a possibility to print several variables in one line in the output windows?

    e.g.

    2014/08/18 smaSlow 154,55 smafast 156,77
    2014/08/19 smaSlow 156,55 smafast 154,77
    ...

    Thanks
    Yes, use +

    Print ( "Hello World! " + ToDay (Time[0]) + "," + ToTime(Time[0]) + ",Entered Short at:" + BarsArray[0].LastPrice );

    Comment


      #3
      Hello phadreus,

      Thank you for your note.

      This is correct. You would need to use the + here to add the different values and strings together.
      Cal H.NinjaTrader Customer Service

      Comment


        #4
        Red marks in the script editor

        Thanks to all of you. It works fine. Just another printing question. The scripting editor marks some words of my coding in red but I get no failure during the compiling process and my strategy works fine as well. Could you give me a hint, what that means. Thanks

        PS: here an example

        Attached Files

        Comment


          #5
          Originally posted by phadreus View Post
          Thanks to all of you. It works fine. Just another printing question. The scripting editor marks some words of my coding in red but I get no failure during the compiling process and my strategy works fine as well. Could you give me a hint, what that means. Thanks

          PS: here an example
          That is standard color coding from the editor. That particular color is used for literal strings.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          59 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          143 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          161 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 05-10-2026, 08:12 PM
          0 responses
          97 views
          0 likes
          Last Post CarlTrading  
          Started by Hwop38, 05-04-2026, 07:02 PM
          0 responses
          283 views
          0 likes
          Last Post Hwop38
          by Hwop38
           
          Working...
          X