Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT 7 beta 19 - ToTime() historical calulations on tick based charts

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

    NT 7 beta 19 - ToTime() historical calulations on tick based charts

    After upgrading from beta 18 to 19, the ToTime() function, like code example below, does not appear to be working properly in Tick and Renko charts historically - when doing backtests and when attaching a strategy (backfilling trades on a chart). It works fine with Minute charts and works fine on all charts Real-Time.

    // Only trade between 7:45 AM and 1:45 PM
    if (ToTime(Time[0]) >= 74500 && ToTime(Time[0]) <= 134500)
    {
    // Strategy logic goes here
    }

    Thanks,

    Powermoney

    #2
    Powermoney, thanks for the report, I was unfortunately not able to reproduce here yet, what dataprovider and symbols / sessions were you using in your testing?

    Thanks
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Bertrand View Post
      Powermoney, thanks for the report, I was unfortunately not able to reproduce here yet, what dataprovider and symbols / sessions were you using in your testing?

      Thanks
      Esignal - YM ES CL SI GC - Default 24/7

      I am using the strategy logic to exist trades when the condition is met (time is within the specified window)

      Comment


        #4
        I tried the attached for example on ES 333 Tick in the Strategy Analyzer backtests and backtesting from chartd and do not run into any issues, would you mind posting a sample that would not work as expected for you?
        Attached Files
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          I tried the attached for example on ES 333 Tick in the Strategy Analyzer backtests and backtesting from chartd and do not run into any issues, would you mind posting a sample that would not work as expected for you?
          In the strategy you sent, shrink the window to 15 minutes like so:

          if (ToTime(Time[0]) >= 74500 && ToTime(Time[0]) <= 80000)

          Set Exit on close to False, and look at a GC and YM Renko 20 charts

          Also, look at a YM 20 range chart.


          Powermoney

          Comment


            #6
            powermoney, please see the screenshot attached, YM 20 Range on Default 24 / 7 sessions, ExitOnClose false, strategy modified as you suggested - both time exits from the last 2 days working as expected here for me, I get the same results when backtesting from SA.
            Attached Files
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Here is what I am seeing (attached) ....
              Attached Files

              Comment


                #8
                Which session template are you using here? Have you tried a fresh reload of historical data already? Seems to me you're missing data here.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Yes reloaded data - Session template is Default 24/7

                  I have this issue on two separate computers, both upgraded from NT 7 beta 18 to 19. Both have Esignal as data provider.

                  What I am seeing is that if the Bar timestamp (close of bar) is not within the ToTime 'window' it does not process the logic. This was not an issue on my either system with b18.


                  PM
                  Attached Files

                  Comment


                    #10
                    PM, please with the attached simple indicator coloring bars and backcolor if the Time conditions are hitting, we checked here on B18 and B19 and could not see differences. The first bar closing (COBC True) satisfying the time condition will trigger the logic.
                    Attached Files
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      Works fine with minute charts and small value Range/Renko. Larger period charts where the Bar opens before and closes after the time window, the indicator does not paint. (see attached)

                      PM
                      Attached Files

                      Comment


                        #12
                        PM, counterchecked also on B18 and see the same behavior there - if the time window is skipped so granularity in your time stamps is not fine enough to provide the resolution needed, it would not trigger the condition at all and thus you would see no paint.
                        BertrandNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Tin34, Today, 03:30 AM
                        2 responses
                        20 views
                        0 likes
                        Last Post Tin34
                        by Tin34
                         
                        Started by sastrades, Yesterday, 09:59 AM
                        2 responses
                        33 views
                        0 likes
                        Last Post brucerobinson  
                        Started by ETFVoyageur, Today, 12:52 AM
                        1 response
                        18 views
                        0 likes
                        Last Post Leeroy_Jenkins  
                        Started by lollers, Today, 03:26 AM
                        0 responses
                        19 views
                        0 likes
                        Last Post lollers
                        by lollers
                         
                        Started by aliyahany, Today, 03:16 AM
                        0 responses
                        4 views
                        0 likes
                        Last Post aliyahany  
                        Working...
                        X