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 Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          637 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          366 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          107 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          569 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          571 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X