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

    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

        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

            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.

                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

                    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.

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        601 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        347 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        103 views
                        0 likes
                        Last Post Mindset
                        by Mindset
                         
                        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                        0 responses
                        559 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        558 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X