Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Incorrectly displaying Daily (and higher) charts in NT8

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

    Incorrectly displaying Daily (and higher) charts in NT8

    I was creating a Pivot indicator when I noticed a peculiar problem with NT8 charting on Daily (and higher) charts.
    On the Daily charts, NT8 is plotting data on a candle it should not be plotting.

    To replicate the issue, I created a simple indicator. Here I am setting the output value to the close of the candle only if the year of the candle is 2020.

    Code:
            
    protected override void OnBarUpdate()
    {
         // Set (display) the closing price of each candle only if the year is 2020
         if( Time[0].Year == 2020 )
         {
              Print(string.Format("Setting Result for {0}.", Time[0].ToString("yyyy.MM.dd HH:mm:ss")));
              Result[0] = Close[0];
         }
    }
    I expect the above code to plot the closing price of each candle where the year is 2020. It should NOT plot output for any other candles where is year is not 2020.



    However, I noticed that NT8 is plotting output for the previous candle (31-Dec-2019) before the first candle of 2020 (02-Jan-2020). In the trace window I cannot see the output message for 31-Dec-2019, so how is the indicator setting the output for 31-Dec-2019 ?

    The problem can also be seen on the Monthly chart, where you can see the value of Dec-2019 candle being set.

    It works correctly for lower time-frames like H1 (e.g. EURUSD H1 or M15 using FXCM) and seems to be an issue with Daily and higher time-frames.

    Is this a bug ? Am I doing something wrong ?

    I have attached the test indicator.

    Steps to reproduce -
    1) Connect to Kinetick data-feed.
    2) Open AAPL Daily chart, set Days to Load to 365.
    3) Now attach the indicator to the chart.
    4) Notice the yellow output is also set on 31-Dec-2019 when it should NOT be set.

    I am using NT8 8.0.21.1 (64-bit) on Windows 10. I am based in India (GMT +5:30), but I don't think that should matter.

    #2
    Uploading the image and attachment again.
    Attached Files

    Comment


      #3
      Hello firstlanetech,

      I am not able to reproduce this behavior.

      Below is a link to a video of the test.
      https://drive.google.com/file/d/1yjo...w?usp=drivesdk

      Are you certain that you have the mouse over the correct candle on the chart?


      Is your PC Clock in sync with internet time?

      Are you using the <use instrument settings> trading hours template?

      If you compile and reload the script and the historical data does this correct the chart?
      Chelsea B.NinjaTrader Customer Service

      Comment


        #4
        Thank you for verifying it. I see that you are getting the correct output.

        Q) Is your PC Clock in sync with internet time?
        A) Yes. I verified my PC clock, it is correct. My GMT offset is +5.5. So the candle open time is 02-Jan-2020 02:30:00. I noticed yours is showing as 02-Jan-2020 14:00:00.

        Q) Are you using the <use instrument settings> trading hours template?
        A) Yes, I am using the <use instrument settings> (default) in the Trade Hours of the chart.

        Q) If you compile and reload the script and the historical data does this correct the chart?
        A) No. I even reinstalled NT8 and tried again.

        Q)Are you certain that you have the mouse over the correct candle on the chart?
        A) Yes. I verified it multiple times. I also had another person verify it.


        I will upload a video tomorrow.

        Comment


          #5
          Here is the link to the video for AAPL.

          https://drive.google.com/open?id=15d...1W0IOolhXVCcfT

          1) Verify latest version of NT8.
          2) Verify PC clock is in sync with Internet Time.
          3) Verify we are using Kinetick EOD connection.
          4) Open AAPL Daily chart.
          5) Attach TestYearly indicator to chart.
          6) Scroll to 31-Dec-2019 and verify that it is plotting data for this candle. (Bug ?)
          7) Check output window for first date. It correctly shows the oldest entry as 01-Jan-2020 candle and then 03-Jan-2020 candle. It does not show 02-Jan-2020.
          However, the chart shows 02-Jan-2020 candle, but does not show 01-Jan-2020 candle.


          I will also upload a video for EURUSD (FXCM) replicating the same issue.
          Last edited by firstlanetech; 05-26-2020, 12:13 AM.

          Comment


            #6
            Here is the link to the video for EURUSD (using FXCM).



            1) Test on Daily chart. It plots the result for 31-Dec-2019 which is incorrect. Also, the candle for 01-Jan-2020 is missing on the Daily chart.
            2) The output window correctly shows the results, but the chart is incorrect.

            3) Test on H4 chart. Works perfectly as expected. The candles are plotted correctly, and output is also correct.

            4) Test on M15 chart. Works perfectly as expected. The candles are plotted correctly, and output is also correct.

            So, the problem seems to be on Daily chart and seems to be for all instruments.
            Also, the first candle of the year is not plotted.

            Comment


              #7
              For AAPL, when I set the year to 2019 (instead of 2020) in the indicator code (also set Days to Load to 1000),

              I notice that it plots the result for 31-Dec-2018 on the chart, but not for 31-Dec-2019 (although it draws the candle for 31-Dec-2019). Interestingly, the candle for 01-Jan-2020 is not drawn and is missing on the chart.

              Comment


                #8
                Hello again,

                I confirmed this on a colleague'ss NT8 terminal (again based in India with GMT +5.30) with both Kinetick and FXCM, and we could reproduce this issue.

                Also notice in the output window in your video, the first candle of 2020 is 02-Jan-2020 14:00:00, but on mine it is 01-Jan-2020 02:30:00. But this 01-Jan-2020 14:00:00 candle is not drawn on my chart.

                When I use a data-feed for Indian markets (https://www.truedata.in/) it works accurately.

                I suspect this issue has to do with time-zone and data-feed for daily data, because it works perfectly on lower time-frames. There seems so sort of rounding of the time.

                I think you can reproduce it by setting your time-zone / locale to GMT +5:30 (India).





                Comment


                  #9
                  I found the cause. When I change my PC time-zone to New York (EST), it works perfectly fine - just like your video.But when I use Indian Standard Time (GMT +5:30) I see the issue.

                  You can reproduce it by setting your PC time to Indian Standard Time.

                  So the issue is definitely in NT8 chart (or calculation) with time-zone calculation.

                  Comment


                    #10
                    Hello firstlanetech,

                    Thank you for letting me know this happens with the IST (UTC + 5:30) time zone specifically.

                    I am further testing and I appreciate your patience.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Hello firstlanetech,

                      I was able to reproduce and I have reported to our development.

                      Once I have a tracking ID or any further information I will update in this thread.
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        #12
                        Hello firstlanetech,

                        Our developers let me know what is going on.

                        In Eastern time the day session for the exchange is within a single day.

                        In the UTC + 5:30 time zone the session starts on the 31st when converted from Eastern and ends on the 1st.
                        Chelsea B.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by bortz, 11-06-2023, 08:04 AM
                        47 responses
                        1,602 views
                        0 likes
                        Last Post aligator  
                        Started by jaybedreamin, Today, 05:56 PM
                        0 responses
                        8 views
                        0 likes
                        Last Post jaybedreamin  
                        Started by DJ888, 04-16-2024, 06:09 PM
                        6 responses
                        18 views
                        0 likes
                        Last Post DJ888
                        by DJ888
                         
                        Started by Jon17, Today, 04:33 PM
                        0 responses
                        4 views
                        0 likes
                        Last Post Jon17
                        by Jon17
                         
                        Started by Javierw.ok, Today, 04:12 PM
                        0 responses
                        12 views
                        0 likes
                        Last Post Javierw.ok  
                        Working...
                        X