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

problem with output window

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

    problem with output window

    all of a sudden my output window is not behaving. i see it flash with output but the output immediately disappears. i do have a ClearOutputWindow command in my strategy but that has always been there. i exited and restarted NT and it worked the first time but not thereafter.
    Any suggestions about where to start looking will be appreciated.

    #2
    P.S. The clear output window command is in the initialize region

    Comment


      #3
      Hi joemiller,

      Does this still happen with an empty script with only a small print statement such as Print(Time[0]); ?
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Hi Chelsea,

        Appears that you are on to something significant. No, it does not happen when I have only Print(Time[0]);

        [ie] works exactly as expected with your debug fix.

        What now? & thanks.

        Comment


          #5
          The output window appears to be behaving consistently and reliable once again with print message output from my indicator and strategy...except that it no longer displays output from both at the same time, whereas it used to do that?

          Any thoughts/suggestions will be appreciated.

          Comment


            #6
            Originally posted by joemiller View Post
            Hi Chelsea,

            Appears that you are on to something significant. No, it does not happen when I have only Print(Time[0]);

            [ie] works exactly as expected with your debug fix.

            What now? & thanks.
            You may have ClearOutputWindow() somwhere else, where you probably put it to help debug something else, and have now forgotten?

            Comment


              #7
              Thanks Koganam,

              I commented the clearoutputwindow and the window filled up more and more with repeat strategy analyzer runs .... so apparently there is only one clearoutputwindow. the mystery lives on.

              Comment


                #8
                Is this symptomatic of anything you can think of?

                Is this symptomatic of anything you can think of?

                upon further investigation, the following consistent output window behavior has been observed:

                --- when the strategy analyzer is run, the output window is populated with the expected number of message lines

                ---after a few reruns the output window goes blank for that rerun

                ---with the next rerun the scenario is repeated [ie] output window goes blank for one rerun after several 'successful' reruns

                ---for each rerun only the expected number of message lines are present, suggesting that a clear output window command has been properly executed in the initialization region each time

                Comment


                  #9
                  forgot to mention that nothing is recorded in the log regarding this

                  Comment


                    #10
                    are there any output window system settings specifying [eg] maximum allowable characters, etc.?

                    I ask because when I do a strategy analysis resulting in a lot of bars, and therefore a lot of output window messages, some early bar info lines are not there in the output window.

                    Comment


                      #11
                      Originally posted by joemiller View Post
                      are there any output window system settings specifying [eg] maximum allowable characters, etc.?

                      I ask because when I do a strategy analysis resulting in a lot of bars, and therefore a lot of output window messages, some early bar info lines are not there in the output window.
                      The Output Window does have an undocumented size. It is just another buffer.

                      Comment


                        #12
                        output window is misbehaving [probably my fault]

                        My output window is still giving me fits. Nothing seems to make sense. For simplicity, I have reduced the situation to printing to the output window from the code for only one indicator. I do not print from the strategy code. Sometimes the dates go in reverse. I have a simple sequence of print statements, one after the other which should appear in the output window one after the other, but they don't. I also tested with only short print statements [eg] Print(Time[0]+"Debug Tracer 2"); but the results were the same?
                        I have been messing around with this for three days now. Any suggestions will be appreciated because the output window is useless to me at present.



                        Comment


                          #13
                          Hi joemiller,

                          I would be happy to test your script for you.

                          Please reduce the code down to only lines necessary to reproduce this issue, then export the script and attach the script to your reply.

                          To export your script do the following:
                          • Click File -> Utilities -> Export NinjaScript
                          • Enter a unique name for the file in the value for 'File name:'
                          • Select the strategy from the objects list on the left -> click the right facing arrow ">" to add the strategy to the export
                          • Click the 'Export' button -> click 'yes' to add any referenced indicators to the export -> click OK to clear the export location message


                          By default your exported file will be in the following location:
                          • (My) Documents/NinjaTrader 7/bin/Custom/ExportNinjaScript/<export_file_name.zip>


                          Below is a link to the help guide on Exporting NinjaScripts.
                          Chelsea B.NinjaTrader Customer Service

                          Comment


                            #14
                            Originally posted by joemiller View Post
                            My output window is still giving me fits. Nothing seems to make sense. For simplicity, I have reduced the situation to printing to the output window from the code for only one indicator. I do not print from the strategy code. Sometimes the dates go in reverse. I have a simple sequence of print statements, one after the other which should appear in the output window one after the other, but they don't. I also tested with only short print statements [eg] Print(Time[0]+"Debug Tracer 2"); but the results were the same?
                            I have been messing around with this for three days now. Any suggestions will be appreciated because the output window is useless to me at present.



                            There is only one way to make a guaranteed test.
                            1. Shut down all workspaces.
                            2. Create and open a new workspace.
                            3. Open one chart.
                            4. Load the test indicator.
                            5. Check the output window.
                            I cannot tell you how many times, my Output Window would send me off on a tangent when I was debugging, only for me to finally realize that some output was coming from the same indicator in a different workspace that was open.

                            Comment


                              #15
                              Koganam,

                              thanks for the prompt reply.

                              I have only one workspace and no charts [except the chart created by the strategy tester.] .... so the plot thickens, stay tuned.

                              I

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Segwin, 05-07-2018, 02:15 PM
                              14 responses
                              1,789 views
                              0 likes
                              Last Post aligator  
                              Started by Jimmyk, 01-26-2018, 05:19 AM
                              6 responses
                              837 views
                              0 likes
                              Last Post emuns
                              by emuns
                               
                              Started by jxs_xrj, 01-12-2020, 09:49 AM
                              6 responses
                              3,293 views
                              1 like
                              Last Post jgualdronc  
                              Started by Touch-Ups, Today, 10:36 AM
                              0 responses
                              13 views
                              0 likes
                              Last Post Touch-Ups  
                              Started by geddyisodin, 04-25-2024, 05:20 AM
                              11 responses
                              63 views
                              0 likes
                              Last Post halgo_boulder  
                              Working...
                              X