Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsSinceNewTradingDay

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

    BarsSinceNewTradingDay

    Does anybody use BarsSinceNewTradingDay? I have spent a lot of time before I have discovered that BarsSinceNewTradingDay in NT8 and BarsSinceSession in NT7 return different values to me. At Code Breaking Changes article is mentioned that it is just renamed - "Property renamed to be more specific". Is there a chance that it is not just renamed but calculated differently?

    #2
    Thank you for writing.

    I will be reviewing your code and this case. When I have additional details I will follow up here on this thread.

    Comment


      #3
      Hello,

      Thank you for writing in.

      What instrument (and expiry if applicable) have you selected?

      Which Session Template are you using?

      Can you provide me a screenshot of the results for both NinjaTrader 7 and NinjaTrader 8?

      To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.

      Click here for instructions

      Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

      Click here for detailed instruction

      I'll be waiting for your reply.

      Comment


        #4
        Hi Patrick!
        Thank you for paying attention. I have used different instruments (stocks and futures) but here lets try futures. Below is the example I have created. I took SMA script from NT7 and NT8 and just added one line into OnBarUpdate(). It is Print("Bars.BarsSinceNewTradingDay: " + Bars.BarsSinceNewTradingDay); in NT8 and Print("Bars.BarsSinceSession: " + Bars.BarsSinceSession); in NT7 (I can attach both scripts if you need it). Then I have opened ES 03-16 with 100 Bars request and "Use instrument settings" template:


        And below is what I got in the Output window:



        What am I doing wrong?
        Rem: TimeZone in the NT8 is the same as local UTC+3
        Attached Files

        Comment


          #5
          And all the same settings but changed instrument to Ford:
          Attached Files

          Comment


            #6
            Hi Patrick,

            Should I provide anything else?
            Stopped by this issue so any advice will be very helpful. Thanks!

            Comment


              #7
              Hello,

              Thank you for posting the details here.

              I would like to see the tests you are using and run these on my end if possible just to ensure we are doing the same test from the start. Could you export the simple tests you are using for each platform for me to compare?

              I realize there is only a single print in each but where the print is in the scripts logic could play a role as I am unsure what else may be in the script at this point.

              I look forward to being of further assistance.
              JesseNinjaTrader Customer Service

              Comment


                #8
                Thank you Jesse!
                The both are attached
                Attached Files

                Comment


                  #9
                  Hello,

                  Thank you for providing these.

                  I did try the files but am not getting the same output, I am getting the expected output or they are matching.

                  I wanted to check, had you done a Reload historical data on both platforms prior to testing this?

                  I have attached my results using the scripts for review.


                  I look forward to being of further assistance.
                  Attached Files
                  JesseNinjaTrader Customer Service

                  Comment


                    #10
                    Hi Jesse!
                    I have reset database and reloaded historical data and now everithing is fine! I am a bit surprised by this solution but absolutely happy that the issue is resolved. Thanks a lot!

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Perr0Grande, Today, 08:16 PM
                    0 responses
                    2 views
                    0 likes
                    Last Post Perr0Grande  
                    Started by elderan, Today, 08:03 PM
                    0 responses
                    5 views
                    0 likes
                    Last Post elderan
                    by elderan
                     
                    Started by algospoke, Today, 06:40 PM
                    0 responses
                    10 views
                    0 likes
                    Last Post algospoke  
                    Started by maybeimnotrader, Today, 05:46 PM
                    0 responses
                    12 views
                    0 likes
                    Last Post maybeimnotrader  
                    Started by quantismo, Today, 05:13 PM
                    0 responses
                    7 views
                    0 likes
                    Last Post quantismo  
                    Working...
                    X