Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

What happened to System.Console.Write?

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

    What happened to System.Console.Write?

    I think that the C# instruction:

    System.Console.Write("The Wonderful World of C# Programming");

    should be included as part of:

    using System;

    The instruction compiles.

    If I open the NT Output window AND the normal DOS window, the instruction is executed but produces nothing on either window.

    So, where'd my Wonderful World go?

    Thanks,

    Larry

    PS: You will guess where I'm going with this so I might as well "included" the next question:

    Compileable console reads seem ignored as well:

    int Number;
    string strNumber;
    strNumber = Console.ReadLine();
    Number =
    int.Parse(strNumber);

    Where'd they go?

    Obvoiously, I want to control my strategy from the keyboard and not let it run on its own hook without the ability for higher lever direction.

    #2
    Larry, please use the Print command to write to the NinjaTrader output window, for more info on the Console Class please refer to MSDN - http://msdn.microsoft.com/en-us/libr...m.console.aspx

    While you should be able to achieve what you look for with C#, this is unfortunately beyond the scope what we support.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Good morning, Bertrand (or night to you),

      I can use the "print" command as easily. I was just trying to coorelate the System .Read and .Write methods to NT6.

      Let me try to phrase the questions in a supportable way:

      Does NT6 support the System.Console.Write C# instruction and where would the output appear?

      Does NT6 support the set of instructions:

      include System;
      int Number;string strNumber;
      strNumber = Console.ReadLine();
      Number = int.Parse(strNumber);

      If so, why does a

      Print (Number.ToString);

      not print a number typed on the keyboard?

      I hope that comes under the "supportable" clause. If not, I'll muddle on.

      Thanks,

      Larry

      Comment


        #4
        Larry, I'm sorry but this is unsupported - for capturing keystrokes with C#, you could review this - http://support.microsoft.com/kb/320584
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Bertrand,

          Thanks anyway and for the advice! I'll follow the trail you started me on.

          Larry

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by chbruno, 04-24-2024, 04:10 PM
          4 responses
          50 views
          0 likes
          Last Post chbruno
          by chbruno
           
          Started by TraderG23, 12-08-2023, 07:56 AM
          10 responses
          397 views
          1 like
          Last Post beobast
          by beobast
           
          Started by lorem, Yesterday, 09:18 AM
          5 responses
          19 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by WHICKED, Today, 12:56 PM
          2 responses
          15 views
          0 likes
          Last Post WHICKED
          by WHICKED
           
          Started by Felix Reichert, Today, 02:12 PM
          0 responses
          4 views
          0 likes
          Last Post Felix Reichert  
          Working...
          X