Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

automatically save the output log into your local machine as a .txt

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

    automatically save the output log into your local machine as a .txt

    Is there a way in the ninjascript to automatically save the output log into your local machine?

    #2
    Hello Boonfly8,

    Thank you for your post.

    Are you referring to saving the output from the NinjaScript Output Window?

    There's not a way to save this automatically; however, saving the output as a .txt file is very easy - all you need to do is right click in the window > Save As. Name your file (it should automatically name something like "NinjaScript Output 2_27_2019 2_20 PM" and save it to your Documents folder or where ever else it will be simple for you to find.

    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hello,
      More than an year ago you replied :

      Are you referring to saving the output from the NinjaScript Output Window?
      There's not a way to save this automatically;

      Automatically , means for me from my code - anything changed ?
      Thanks ,

      Comment


        #4
        Hello xTrader1,

        Thank you for your reply.

        The closest you could get from code to automatically saving the output window would be to use StreamWriter to write whatever information you want to save automatically to a file. This would not necessarily print all the info from the Output window as some of those messages come from within NinjaTrader but you could certainly monitor for errors, times, prices, etc. and write those to a file. Here's an example from our help guide of using a StreamWriter to print some bar information to a file:



        This may be adapted to your needs.

        Please let us know if we may be of further assistance to you.
        Kate W.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cre8able, Yesterday, 04:22 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by stafe, 04-15-2024, 08:34 PM
        5 responses
        28 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by StrongLikeBull, Yesterday, 04:05 PM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by Mestor, 03-10-2023, 01:50 AM
        14 responses
        375 views
        0 likes
        Last Post z.franck  
        Started by molecool, 10-09-2017, 10:48 AM
        5 responses
        1,621 views
        0 likes
        Last Post trader-ap  
        Working...
        X