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

    #31
    Hello joemiller,

    Please try the following:

    xOpen=((xCloseyest+Bars.GetDayBar(1).Open)*0.5+0.0 0333);
    Chelsea B.NinjaTrader Customer Service

    Comment


      #32
      That worked Chelsea. Many thanks ... you are very good at what you do.

      Any of your thoughts about the following will be welcome:
      When the Strategy Analyzer "Run Backtest" bar is clicked the Output Window behaves as expected. When it is reclicked a simple repeat of results does not occur in that the dates start somewhere in the middle of the start/end date window go to the end, then display the whole time span? The initialize region of the strategy has a ClearOutputWindow() statement. It's not all that critical so I won't pursue it any further unless it becomes a serious issue.

      Comment


        #33
        Hey joemiller,

        Really I would need to see this to understand.

        I tried running the strategy in the Strategy Analyzer. Prints are what I would expect though.

        If you'd like to take a video of this, below is a link to some free software to do so.
        http://www.techsmith.com/jing.html
        Chelsea B.NinjaTrader Customer Service

        Comment


          #34
          ISSUE #1
          I have modified the code previously sent to you… it is attached for use in this discussion.

          Set the Strategy Analyzer for Forex, EURUSD price data, 1 day bars, from date = 1/1/13, to date = 7/10/13.

          Expected results from the print stmts is 4 lines for each day [each bar], looking iike the following 4 lines, starting from the earliest possible date to final date.
          xODay 7/10/2013 5:00:00 PM
          17 00 00
          xOpen from Indicator=1.2847
          redline from Strategy=1.2847
          However, I do not understand the behavior of the output window...it is not as expected. It does not start where expected, and sometimes repeats, starting at the beginning. [The initialize region of the strategy has a ClearOutputWindow() statement].

          Thanks for the link to the free video software…looks like it could be useful.

          ISSUE #2
          The bars in the chart are heiken ashi bars so the redline should be at the open of each bar, shifted one day.
          However, that is not the case. I will be doing some desk checking and generating more debug tracer print messages to the output window, etc.
          Attached Files

          Comment


            #35
            Seems to me that the problem in Issue#2, "redline bogus values" in the previous post, has to be in the calculations. So it is entirely my problem and not a problem with the mechanics of NT. So it is a dead issue...no help needed on that one.

            Comment


              #36
              Hello joemiller,

              I have imported the updated files.

              First I removed the ClearOutputWindow call.

              Next, I opened a Strategy Analyzer window and ran this on the $EURUSD 1 day instrument with the default settings.

              Attached are the results of the test.

              The results follow the logic of the code. The indicator waits 72 bars (days) before printing. During this time the strategy does its 72 prints. When the indicator does start printing the day and time and calculations are sequential and appear correct.

              Please supply me with your output in the same format (for easy reading).
              Attached Files
              Chelsea B.NinjaTrader Customer Service

              Comment


                #37
                Oh my gosh! How embarrassing! I forgot about having to change the 72 bars to conform to day bars instead of hourly bars. Your explanation makes total sense, and I think I understand completely. Works cleanly and beautifully for me now.

                Shouldn't the ClearOutputWindow simply do what it implies [ie] why did you remove it?

                Thanks again for all your help in bumping me back onto track...you have been great.

                Comment


                  #38
                  Hi joemiller,

                  I removed the ClearOutputWindow call just so I could see if there was looping issues.

                  Really it didn't change anything.
                  Chelsea B.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by cre8able, Today, 01:16 PM
                  2 responses
                  9 views
                  0 likes
                  Last Post cre8able  
                  Started by chbruno, 04-24-2024, 04:10 PM
                  3 responses
                  48 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by samish18, Today, 01:01 PM
                  1 response
                  7 views
                  0 likes
                  Last Post NinjaTrader_LuisH  
                  Started by WHICKED, Today, 12:56 PM
                  1 response
                  9 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by WHICKED, Today, 12:45 PM
                  1 response
                  11 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Working...
                  X