Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Daily OHLC is not in sync with 5 min candles for that day.

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

    Daily OHLC is not in sync with 5 min candles for that day.

    Daily OHLC is not in sync with each 5 min candles for that day. Ex – While looking at the 5 min chart for 11/13/2020, OHLC from 11/12/2020 (Daily ) is displayed till candle 12:20 PM ( though the 12:20 PM 5 min candle is for 11/13/2020), Pls refer panel 1 in Screenshot 1.
    From 12:25 PM, is it showing OHLC for 11/13/2020. Pls refer panel 1 in Screenshot 2.
    Expectation is that for each 5 min candle on 11/13/2020, OHLC value of 11/13/2020 (daily) should be displayed on panel 1. The session applied is for NSE (9:15 AM to 3:30 PM).

    Can you please guide where I am going wrong with the setup?
    Attached Files

    #2
    Hello zephyr_1279,

    Daily bars will ignore trading hour templates, as they are delivered by the exchange "as is".

    That means, if you request daily bars for an instrument, all you receive is the date, the OHLC, and Volume data.

    It seems that, in this case, this contradicts the trading hour template used on the 5-minute bar.

    One way to circumvent this is by building your daily bars manually on your platform. To do this, simply change the daily chart to a 1440-minute chart. As there are 1440 minutes in a day, NinjaTrader would then request minute-candles to build the daily bars while respecting your trading hour template selected.

    That way, the 5-minute and daily chart would be based on identical data and should overlap accurately.

    Please don't hesitate to let me know if you have any questions in this regard!
    Manfred F.NinjaTrader Customer Service

    Comment


      #3
      Hello Manfred F.,

      Thanks for the quick response.

      The lowest timeframe data that I have is of 5 min and the data available is 75 bars per day ( 9:15 AM to 3:30 PM = 75 - 5 min bars ) .

      So if I have to build Daily data from that for trading session ( 9:15 AM to 3:30 PM = 375 Min ), could you please suggest how should I proceed ? I tried giving 375 based upon the 5 min bars available for the session as shown in screenshot, but the issue remains.

      Thanks !
      Attached Files

      Comment


        #4
        Hello zephyr_1279,

        I would suggest selecting 1440 minutes.

        This would first take a 24-hour timeframe into consideration before it then fills this 'day' candle with the data from all minute-candles that arrive during the selected trading hours.

        As this respects your trading hour template, you would not receive 1440 minutes of data but only the data from the NSE trading hours:

        Click image for larger version

Name:	1440.png
Views:	295
Size:	26.9 KB
ID:	1128377

        Please don't hesitate to let me know, should this not work or if you have any further questions!
        Manfred F.NinjaTrader Customer Service

        Comment


          #5
          Hello Manfred F,

          I followed the mentioned approach. However, the problem persists. The last bar shows the OHLC values correctly, however, when I place the cursor on the intermediate 5 min bars, it corresponds to the OHLC of prior day for the bars until 12:20 PM in panel 2 (Daily data). From 12:25 AM onwards, it shows same day OHLC (Daily).


          Thanks.

          Comment


            #6
            Hello zephyr_1279,

            I have not yet been able to reproduce this.

            To track down what might be causing this, could you please let me know what time zone you are in, as well as which time zone is selected under Tools > Options > Time zone?

            If possible, please also attach a screenshot of your Data Series' settings.

            Thank you in advance!
            Manfred F.NinjaTrader Customer Service

            Comment


              #7
              Hello Manfred F,

              My Timezone is (UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi and same has been selected under Tools > Options > Time zone. I am using NSE data for creating data series. (Trading time is from 9:15 AM to 3:30 PM) . Please find attached the screenshot for the same. Also attaching the Dataseries settings for your reference.

              Thanks.
              Attached Files

              Comment


                #8
                Hello zephyr_1279,

                Thank you very much for your reply.

                In this case, the candle appearing at 12:25 AM would make sense.

                While the 30-minute offset would be due to being in a timezone that is half an hour off, the reason this appears at 12:25 is simply due to it then being closer than the other candle.

                The data box will always show the closest candle to the cursor, as such, 12:25 is when the next candle is closer than the last:

                Click image for larger version

Name:	data box.png
Views:	314
Size:	62.0 KB
ID:	1128572

                As this is an innate setting of the data box, it's unfortunately not something that can be changed.
                Manfred F.NinjaTrader Customer Service

                Comment


                  #9
                  Hello Manfred F,

                  Thank you for the response. I hope this is just something to do with the Databox. When creating a Multi timeframe indicator, hope this will not be an issue and 5 min candle will refer to the correct day's OHLC values.

                  Comment


                    #10
                    Hello zephyr_1279,

                    Thank you very much for your reply.

                    This would indeed be the way the Databox works and would not occur on any indicator. A good example of this is below.

                    In this case, I've added the "PriorDay OHLC" indicator to draw the close price on the 5-minute chart:

                    Click image for larger version

Name:	Prior Day close.png
Views:	409
Size:	43.4 KB
ID:	1128588

                    As you can see, the indicator resets with the session start, as such, it would always go from 1 second after the last candle to the next daily candle.

                    Please note; I have used the NQ instrument in these examples, on the NSE trading hour template. As such, the data would look different to the NIFTY.
                    Manfred F.NinjaTrader Customer Service

                    Comment


                      #11
                      Hello Manfred F,

                      Thanks for your response. I tried to apply 5 period EMA of Daily TF on 5 min, and I expected it to be a straight line as the EMA(Daily_Close,5) would be a specified value on a particular day for all 5 min bars and should change only on the next day. However, I am getting a sloping line for Daily EMA when applied on 5 min bars. I believe it should be a straight line for that specific day and should change only the next day. Attaching the screenshot for your reference. Could you please let me know if I am wrong somewhere in applying the indicator?

                      Thanks.
                      Attached Files

                      Comment


                        #12
                        Hello zephyr_1279,

                        If the EMA is charted as a 5-period on the 1440-minute chart, it would use 5 1440-minute candles, even if it's then drawn on the 5-minute chart.

                        As these values are then connected, this would result in a line connecting each of the EMA values together, as such we would expect this line to not be horizontal.

                        One way to get a horizontal line at the last close would be to use the "Prior day OHLC" indicator:

                        Click image for larger version

Name:	Prior day OHLC.png
Views:	421
Size:	80.3 KB
ID:	1128968

                        This indicator lets you, independent from the data series it's charted on, draw the last close across the whole day, until the session closes and the new values are charted.

                        Would this work in your case?
                        Manfred F.NinjaTrader Customer Service

                        Comment


                          #13
                          Thanks Manfred F. I will try it out.

                          Comment


                            #14
                            Hello Manfred F.

                            Could you please let me know if it is possible to use indicator on indicators? I want to plot EMA (Daily Close, 5) on 5 min chart. How can I use "Prior day OHLC" indicator along with Daily EMA to plot on 5 min chart?

                            Thanks.

                            Comment


                              #15
                              Hello zephyr_1279,
                              I would like you to confirm if you've correct Time Zone in Trading Hours template, Tools -> Trading Hours -> NSE -> Time Zone. Attaching snapshot for clarity.
                              Yes, you can use Indicators on indicators & you can add EMA 5 of Daily to 5 min chart, you need to have both charts on same panel & set daily to transparent if you don't wish to see it as it can be confusing, add EMA normally & in Input change the data series to daily.
                              Hope it helps!
                              Click image for larger version

Name:	nse.jpg
Views:	402
Size:	76.3 KB
ID:	1129787
                              Last edited by s.kinra; 11-27-2020, 11:56 PM.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by helpwanted, Today, 03:06 AM
                              1 response
                              5 views
                              0 likes
                              Last Post sarafuenonly123  
                              Started by Brevo, Today, 01:45 AM
                              0 responses
                              7 views
                              0 likes
                              Last Post Brevo
                              by Brevo
                               
                              Started by aussugardefender, Today, 01:07 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post aussugardefender  
                              Started by pvincent, 06-23-2022, 12:53 PM
                              14 responses
                              242 views
                              0 likes
                              Last Post Nyman
                              by Nyman
                               
                              Started by TraderG23, 12-08-2023, 07:56 AM
                              9 responses
                              384 views
                              1 like
                              Last Post Gavini
                              by Gavini
                               
                              Working...
                              X