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

How to print more information onto the output window?

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

    How to print more information onto the output window?

    Hello,

    My strategy calculates on each tick and runs on a 30 minute time period.
    The strategy only works for the first 30 minutes of each day. When I run this strategy on a backtest on one day of data, (say: Start Time = 11/15/2021, End Time = 11/15/2021), so much information is printed on the output that it says:

    "You have reached the maximum threshold of the NinjaScript Output window. Some of your output messages have been suppressed." I realize that the output window has a character limit.

    Because of this, the output only has information printed from 11/15/2021 3:00 PM to 11/15/2021 4:00 PM so I can't see what happens when the strategy actually performs actions @ 8:30 AM to 9:00 AM which is suppressed.

    How can I capture and save all of the info that is suppressed and printed on the output window?

    #2
    If you wrote your output to a file, there would be no limit.

    Comment


      #3
      Hello Don22Trader1,

      Thanks for your post.

      The Output Window is limited and has a maximum number of lines.

      If a large amount of data is being tested, I would recommend instead writing this to a file to avoid the maximum number of lines allowed in the Output Window.

      Below is a link to a reference sample that demonstrates writing data to a file.
      https://ninjatrader.com/support/helpGuides/nt8/using_streamwriter_to_write_to.htm

      As well as a link to an example script that writes condition information to a file.
      https://ninjatrader.com/support/foru...nce#post100192

      Let us know if we may assist further.
      Brandon H.NinjaTrader Customer Service

      Comment


        #4
        Brandon,
        How do i limit the prints to once per trade instead of on every bar update?

        Comment


          #5
          You could use OnExecutionUpdate to detect when a new trade is executed and do your logging there...
          Bruce DeVault
          QuantKey Trading Vendor Services
          NinjaTrader Ecosystem Vendor - QuantKey

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by DJ888, 04-16-2024, 06:09 PM
          4 responses
          11 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by terofs, Today, 04:18 PM
          0 responses
          5 views
          0 likes
          Last Post terofs
          by terofs
           
          Started by nandhumca, Today, 03:41 PM
          0 responses
          5 views
          0 likes
          Last Post nandhumca  
          Started by The_Sec, Today, 03:37 PM
          0 responses
          3 views
          0 likes
          Last Post The_Sec
          by The_Sec
           
          Started by GwFutures1988, Today, 02:48 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Clayton  
          Working...
          X