Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Analyzer appears to recycle from start to end date?

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

    Strategy Analyzer appears to recycle from start to end date?

    Why does the following happen?
    When running the strategy analyzer and printing the date to the output window at every entry to onbarupdate, I expected dates to appear for every day and only once and then the run would cease ... sequentially from time frame start to end date. However the start to end date cycle is repeated, accompanied by a few other additional confusing aspects. I can live with it but would like to know why.

    #2
    Joe, which exact print statement are you then using now in OnBarUpdate() to see the date/timestamp?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      for the indicator---
      public string format1="MM/dd/yyyy HH:mm";
      public string format2="HH:mm";
      Print(
      "entered LV3indicator OnBarUpdate"
      +" "+Time[0].ToString(format1)
      +
      "//"+Time[0].ToString(format2)
      +
      " "+Time[0].DayOfWeek);

      for the strategy---
      public string format1="MM/dd/yyyy HH:mm";
      public string format2="HH:mm";
      Print("entered LV3strategy OnBarUpdate"
      +" "+Time[0].ToString(format1)
      +
      "//"+Time[0].ToString(format2)
      +
      " "+Time[0].DayOfWeek);

      Comment


        #4
        Thanks. Which timeframe are you testing on? OnBarUpdate() is called for each bar, so each bar in the day will trigger this print then. To see the sequence better, add for example the CurrentBar processed info in -

        Print("entered LV3strategy OnBarUpdate" +" Bar " + CurrentBar + " " +Time[0].ToString(format1) +"//"+Time[0].ToString(format2) +" "+Time[0].DayOfWeek);
        BertrandNinjaTrader Customer Service

        Comment


          #5
          the time frame is one day however the indicator [written for me by Lance] works with two time frames to make getdaybar work the way I want it to. I have no idea how or what he did. but it does not seem like that would cause the recycling thru the start/stop time frame window.

          see attachments
          Attached Files

          Comment


            #6
            Would the strategy use an additional timeframe internally? If it did then your print would be called for each series, thus duplicate calls could be expected for this print. You could filter that with BarsInProgress to only have the primary for example hit this condition.

            BertrandNinjaTrader Customer Service

            Comment


              #7
              per post #1
              "Why does the following happen?
              When running the strategy analyzer and printing the date to the output window at every entry to onbarupdate, I expected dates to appear for every day and only once and then the run would cease ... sequentially from time frame start to end date. However the start to end date cycle is repeated, accompanied by a few other additional confusing aspects. I can live with it but would like to know why."

              so I think I understand that duplicate calls should be expected as the analyzer run progresses. my question is ... why does the analyzer run from start date to end date, and then repeats that cycle?

              Comment


                #8
                Duplicate calls would also be seen for the historical part for sure, even more so if multiple instruments are tested for example in a basket test or optimization then (here multiple instances of the same script would be used).
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  duplicate calls make sense to me, no prob there. that is not my concern. I just still don't understand why the analyzer runs from start date to end date more than once? but no matter, I think the print to output window as it is will serve my debugging/checking/tracing purposes.

                  Comment


                    #10
                    it works ok now... no longer a concern.
                    don't know what fixed it but it's fixed.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by bmartz, 03-12-2024, 06:12 AM
                    4 responses
                    31 views
                    0 likes
                    Last Post bmartz
                    by bmartz
                     
                    Started by Aviram Y, Today, 05:29 AM
                    4 responses
                    11 views
                    0 likes
                    Last Post Aviram Y  
                    Started by algospoke, 04-17-2024, 06:40 PM
                    3 responses
                    28 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Started by gentlebenthebear, Today, 01:30 AM
                    1 response
                    8 views
                    0 likes
                    Last Post NinjaTrader_Jesse  
                    Started by cls71, Today, 04:45 AM
                    1 response
                    7 views
                    0 likes
                    Last Post NinjaTrader_ChelseaB  
                    Working...
                    X