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

DateTime in NT8 Two

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

    #16
    Hi Jessica,

    I took a look at the sample strategies you provided. The only difference between the two on my end seems to be that NT8 is not recognizing the Exit On Session Close even thought it is checked. So I'm getting one less trade than NT7. But the performance numbers seem to be identical so it must be counting that last trade.

    I'm not sure how this helps with the two strategies I provided previously, as they still do not match. Maybe there is a setting that is causing this?

    Thanks,

    Lee

    Comment


      #17
      After carefully reviewing your code again, I was able to determine that the best place to look will be your code rather than your settings. Please let us know if there are any other ways we can help.
      Jessica P.NinjaTrader Customer Service

      Comment


        #18
        Hi Jessica,

        I guess I'm a little confused. Please understand I'm a novice when it comes to ninjascript, The two sample codes I provided you for both NT7 and NT8 were identical as far as I know. But the results for NT8 do not match that from NT7. Is this not the case?

        If so, then why are the two producing different results? Is this sommething with the code or the program? If it is the code,then I am asking for your help in understanding what could cause the difference?

        Thank you,

        Lee

        Comment


          #19
          After more careful review of your code, I understand that the differences were superficial. I apologize for the error on my part. You are correct that the settings involved are the best place to look.

          Of those, the most likely place to look would be the ETH -> RTH shift for several futures instruments between NinjaTrader 7 and NinjaTrader 8. One way to eliminate this as a variable would be to press ctrl + f in your chart, and change the trading hours from "<Use instrument settings>" to a manually setting of your choice that is the same between NT7 and NT8.
          Jessica P.NinjaTrader Customer Service

          Comment


            #20
            Hi Jessica,

            Thank you for the response. I tried manually changing the Trading Hours to be the same between NT7 and NT8, but still the same problem. NT7 and NT8 produce different results for the same strategy.

            Are you getting the exact same results between NT7 and NT8 for the two strategies I sent you?

            Comment


              #21
              Since the two scripts are identical, and you are reporting different results, I would like to investigate this as a NS bug. To better enable me to do so, So that I may have a more complete picture of what is happening on your end, would it be possible to use the freely and publicly available screen capture software Jing, https://www.techsmith.com/jing.html , or a similar program which can record video of what is happening on your screen during a backtest of your strategy, so that you can show me what is occurring on your end? These quick instructions can get you started with Jing.


              1. When you start Jing, a yellow half circle will appear near the top of your screen. Please hover over it with your mouse

              2. A small + sign will extend out of this half circle. Please click on it

              3. When your cursor becomes two intersecting lines, please click and drag your mouse over an area of your screen you would like to record

              4. Please press the film strip button that appears to begin recording

              5. When you are finished recording, please press the square stop button that appears

              6. Please press the share button that appears. It consists of three vertical upward pointing arrows.


              You will then have the option to view your video on screencast.com . This is the link which can help me diagnose what is happening on your end. It is possible you will need to set up a free account in order to share videos.


              Thank you very much in advance for providing us with this information. If this procedure is not an option for you, or if there are any other questions we can answer, please let us know.
              Jessica P.NinjaTrader Customer Service

              Comment


                #22
                Hi Jessica,

                Before I begin this process you recommended, can you tell me if you are getting the same results with both the NT7 and NT8 scripts I sent you when using Backtest??

                Thanks,

                Lee

                Comment


                  #23
                  The results for the period of time I saw were the same. The video will help me understand how they were different on your system and exactly what was meant with respect to the final bar difference you reported. Debugging user code is beyond the scope of the support we may provide, but I will be happy to ensure that Ninja is operating properly, and that all differences between NT7 and NT8 are properly documented. Seeing the difference in your system is necessary for me to understand what the difference is and what is causing it, so that I can accomplish these goals.
                  Jessica P.NinjaTrader Customer Service

                  Comment


                    #24
                    Hi Jessica,

                    I sent a link to the videos you requested with the password to your email.

                    Thanks,

                    Lee

                    Comment


                      #25
                      Thank you Lee. I will follow up here when I have any more information to report or require any further information.
                      Jessica P.NinjaTrader Customer Service

                      Comment


                        #26
                        Hello lee612801,

                        Time[1] without at least 1 bar available will not be supported. Please let us know if there are any other ways we can help.
                        Jessica P.NinjaTrader Customer Service

                        Comment


                          #27
                          Originally posted by NinjaTrader_JessicaP View Post
                          Time[1] without at least 1 bar available will not be supported. Please let us know if there are any other ways we can help.
                          Are you implying it was supported before?

                          Comment


                            #28
                            Originally posted by bltdavid View Post
                            Are you implying it was supported before?
                            Sorry, I wasn't trying to be sarcastic or mean.

                            Jessica, it is awfully ambiguous to use "will" rather than "is".

                            To say "will not be supported" implies your present or future plans, but says nothing about the past, that is, the status of "supported" (or not) for NT7 remains unclear.

                            I mean, wasn't the whole issue centered around Time[1] somehow being available to NT7, apparently even on the first bar (when clearly it should not be)?

                            What does "will not be supported" mean in the context of NT8?
                            (simple, going forward, very clear, not supported)

                            What does "will not be supported" mean in the context of NT7?
                            (no idea, this is a past product, will NT7 receive a fix?)

                            Do you see my point?

                            [Edit: Ah (slaps forehead) I think, Jessica, you mean that whether the code supports it or not, you guys in NinjaTrader Support do not condone or support that usage in either NT7 or NT8. OkOkOk, yah mon, I think I get why you said it that way... my bad.]



                            [Edit2: The word "supported" can have different meanings to the core software engineer vs ongoing QA/Sustainment/Maintenance engineer. I was thinking more like the software engineer: where if no compiler error and Time[1] produces consistent results then use of Time[1] in that context means it is supported by that compiler (even if it is now considered a bug in that compiler).]
                            Last edited by bltdavid; 02-28-2017, 07:33 PM.

                            Comment


                              #29
                              Poking around some here, it CAN work in NT8.

                              I don't see where the original poster said what time frame they were using it on.

                              I had success on a chart with Time[1].DayOfWeek.

                              Timeframe appears to matter a lot.

                              Today is Tuesday, 2/28/2017.

                              Let's just say, depending on the chart time frame (seconds/minutes), and what version (NT7/NT8), and adding to control center or a chart, I got entirely different results ranging from "Wednesday", "Sunday", "Thursday", "Tuesday". It's all over the place I can't make heads or tails of it.

                              The one weird one I saw was Time[0] and Time[1] worked in NT8, but Time[2] did not.
                              Attached Files

                              Comment


                                #30
                                I am happy to clarify my response, bltdavid, and I would like to thank you for pointing out where I could be more clear and encourage similar replies in the future, as this will help us maintain high standards on our end.

                                With regard to NinjaTrader 7, since it is no longer under active development, in situations where calling Time[BarsAgo] either works as expected or at least without errors when BarsAgo is greater than CurrentBar, NinjaTrader 7 will continue working in this manner. Since this is undocumented functionality, using this feature is risky, as a change to NinjaTrader could prevent it from working in the future. However, since again NT7 is no longer under active development, this risk is minimal and we can expect this to continue working in all cases where it currently does for the forseeable future.

                                For both NT7 and NT8, since this is undocumented functionality, we will not be able to answer user questions about what this should do, since there is no clear definition as far as what it should do, and we will discourage users from this practice.

                                With regard to NinjaTrader 8, since this is under active development, using Time[BarsAgo] when BarsAgo is greater than or equal to CurrentBar is substantially riskier. Users should be aware that, at any time, NinjaTrader 8 can be modified so that even in cases where this currently works, code that depends on this may break in the future. Users should therefore, whether or not this works, set up their NinjaTrader 8 code to use BarsAgo values for any data series, including the Time series, that are less than CurrentBar, and should treat situations where Time[BarsAgo >= CurrentBar] as uncaught exceptions.
                                Jessica P.NinjaTrader Customer Service

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by trilliantrader, Today, 08:16 AM
                                0 responses
                                3 views
                                0 likes
                                Last Post trilliantrader  
                                Started by AttiM, 02-14-2024, 05:20 PM
                                9 responses
                                174 views
                                0 likes
                                Last Post NinjaTrader_BrandonH  
                                Started by funk10101, Today, 08:14 AM
                                0 responses
                                2 views
                                0 likes
                                Last Post funk10101  
                                Started by adeelshahzad, Today, 03:54 AM
                                1 response
                                13 views
                                0 likes
                                Last Post NinjaTrader_BrandonH  
                                Started by RookieTrader, Today, 07:41 AM
                                1 response
                                5 views
                                0 likes
                                Last Post NinjaTrader_ChelseaB  
                                Working...
                                X