Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Setting Bar Time Stamps To Start Times

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

    Setting Bar Time Stamps To Start Times

    I noticed all my chart bars are time stamped with ending times. I'm used to using start time stamped bars.

    How do I change this in NinjaTrader settings?

    I'm using TDA for my data feed.

    Thanks

    #2
    Hello,

    Thanks for posting.

    This would be expected and is not something that can be changed. NinjaTrader stamps a bar with the closing time of the bar. For example, a minute bar with a time of 9:31:00 AM has data from 9:30:00 AM through 9:30:59 AM. Using end of bar time stamps is required in order to be able to plot multiple series of differing time frames within a single chart all accurately synchronized to time.
    Drew O.NinjaTrader Customer Service

    Comment


      #3
      Thanks Drew,

      I read that in the reference manual, but it doesn't sound right. Other trading platforms support multiple timeframes and multi instruments with start time bar time stamps.

      The problem with the NT approach of time stamping, is the hourly end of day bar's time stamp is offset by 1/2 hour (markets close at 1300 hours) from other hourly bars. With the conventional time stamping using start time, the closing hourly bar is always one hour later than the previous bar.

      Since it can't be changed, I'll have to adjust my strategy logic to account for the non-standard timestamps used by NT.
      Last edited by borland; 07-18-2016, 07:28 AM.

      Comment


        #4
        Bar Time Stamp

        Hi There,

        Can you confirm that this is still the case in NT 8 ?

        Thanks,
        Last edited by waverider; 11-10-2016, 03:14 AM.

        Comment


          #5
          Originally posted by waverider View Post
          Hi There,

          Can you confirm that this is still the case in NT 8 ?

          Thanks,
          Yes, this is still the case in NinjaTrader 8.

          Comment


            #6
            However many other platforms (i.e. Thinkorswim, TradingViews) uses "open" of bar for their timestamp.

            This difference of timestamp setup will result significant chart difference, especially with larger and larger intraday time intervals (i.e. 30min, 1h, 4h, 8h). And due to significant chart difference between other platforms, the indicators/signals/strategies will result very differently.

            Is it possible to submit a feature request for:

            An option to let NT8 user to select to use either "Open" or "Close" of bar for chart timestamp at program level will be very beneficial. If use decided to change from "Close" to "Open", entire NT8 programs must be shutdown and than restarted for it to take effect.

            Comment


              #7
              Hello richard76,

              Thank you very much for your post.

              Our Development Team considered enabling an option to switch between this in the past. After a careful analysis, however, it would take a complete rewriting of the way charts are rendered to enable this, which would not be feasible to implement in the current version.

              While we are definitely looking into this for future iterations of NinjaTrader, it would likely not be possible to integrate this into the current NinjaTrader 8 version, I hope for your understanding.

              Should you have any further questions, please don't hesitate to let us know!
              Manfred F.NinjaTrader Customer Service

              Comment


                #8
                Thank you for your super fast feedback NinjaTrader_Manfred .

                If this is the case, is there anyway we can do to "minimize" the difference of Chart/indicator/signal impact from the two different method of timestamping?

                For example, some kind of custom resolution, or adjust some settings in NT8?

                Comment


                  #9
                  There should, as far as I know, be no real impact, as this is a visual setting only.

                  E.g. the candle would still contain data from OPEN to CLOSE but charts these values at the close of the candle instead of the open time.

                  This means if you e.g. compare a 60-minute candle that closes at 1 PM on one platform to NinjaTrader, the only difference should be that NinjaTrader shows the candle at 1 PM, and a platform that would chart at the open would show it at noon.

                  As the underlying data and timeframe are identical, however, I would generally expect all charts and indicators to appear identically (as far as real-time data allows these to be identical). Do you have a specific example where this discrepancy causes an issue?

                  The only option I am aware of that would modify this behavior would be to adjust the platform's local timezone. However, this would only work if you permanently chart e.g. 60-minute candles. Setting the timezone to one hour prior would then show the candles at the identical time a platform charting them at the open-time would.

                  I look forward to your reply!
                  Manfred F.NinjaTrader Customer Service

                  Comment


                    #10
                    Yes there are plenty of examples I can provide from this “timestamp difference”.

                    For example, from the following charts of NT and Thinkorswim of 4h timeframe, you can see the latest few candles are significant different between the two platforms:

                    Click image for larger version

Name:	00.png
Views:	807
Size:	96.7 KB
ID:	1190042

                    If my indicator/signal is based on comparing candlesticks for the recent few bars:
                    • C[0] > C[1] and C[0] > C[2]
                    • And
                    • H[1] > H[2]
                    Than the above logic will produce different results among the two different platform.

                    Also any Moving Averages produced will have different values as well, due to different candlestick Closes....

                    So Yes, there are plenty of situations the results of indicators/signal will be very different.

                    Comment


                      #11
                      Hello richard76,

                      Thank you very much for the provided screenshots.

                      In general, the open, high, low, and close values should be identical, they would simply be charted at a different time. As long as the trading hours being charted and the timeframes are identical, both platforms should provide identical candles.

                      Seeing that the candles differ in both applications would indicate that the data itself is not identical, as the close for a 2-4 PM candle should be the same, regardless of whether this candle is charted at 2 or 4 PM.

                      As a first step, please ensure that both platforms use the same trading hours. If one platform e.g. starts the first candle at 8:15 AM, and one at 8:00 AM, both would permanently be offset. A small offset such as this would explain how most candles still appear identical.

                      Please also synchronize your PC's clock. As I do not know how TD Ameritrade handles this data in its own client, it could be that locally-timestamped data is offset, e.g. if your clock is off by a few seconds. To do this, please follow the steps below:
                      • Right-click the clock in the lower right corner of your desktop
                      • Select Adjust date/time
                      • For Windows 10 click 'Date, Time, and regional formatting' -> Then click 'Additional date, time, and regional settings' -> then click 'Set the time and date'
                      • Select the 'Internet Time' tab at the top
                      • Set the server to time.nist.gov and then click Update.
                      • If the message that appears says successful your PC clock should now be updated.
                      • If not, select a different server from the Server: drop-down and try again (repeat until one of the servers is successful)
                      Last but not least, it's also important to understand that TD Ameritrade does not provide tick-based updates through the API, but provides filtered/snapshot data about every 0.2 seconds. This means the data that arrives in NinjaTrader (if you use a TDA connection) can already differ from what TD Ameritrade displays in its own Thinkorswim platform, depending on whether this is filtered as well.

                      If you are using a TD Ameritrade account to feed NinjaTrader with data, please right-click the chart and "Reload all historical data", this would forego the snapshot data and replace it with unfiltered historical data. If this corrects the discrepancy, it would also give us a further indication.

                      You may also find a bit more information on what can cause this offset in our HelpGuide below:



                      I look forward to your reply!
                      Manfred F.NinjaTrader Customer Service

                      Comment


                        #12
                        The NQ data I used for NQ is from IB.

                        (1) ensure that both platforms use the same trading hours - How to you check/set this for NT?
                        (2) Yes I have already updated the PC clock beforehand.
                        (3) IB also uses snapshot data, but I think it will not be that off, especially for the 4hr timeframe.

                        Comment


                          #13

                          Hello richard76,

                          Thank you for the response.
                          1. To change/look at the Trading Hours Template in use for a chart:
                            • Right-click on the chart background and select Data Series
                            • Properties > Time frame > Trading hours
                            • The Trading Hours Template in use is selected here
                              • If it says <Use Instrument settings>:
                                • Go to the Control Center > Tools > Instruments > Search for the instrument > Double-click the appropriate result > The Trading Hours Template defined here will be used
                          3. The Trading Hours Template on a chart can have a large effect on the plotting data as it dictates when to Start plotting and what hours to consider for that session.
                          I performed the following test:
                          • Connected to Kinetick Market Data
                          • Created a chart for the NQ 03-22
                          • Used the default "<Use Instrument Settings> Trading Hours template > Took a Screenshot
                          • Changed the Trading hours template to "Default 24x7" > Clicked OK > Reloaded all historical Data > Took a Screenshot
                          • I then Disconnected from Kinetick and then Removed all Historical Data from the NinjaTrader platform
                          • I then Connected to Interactive Brokers and perform the exact same steps and these were my results

                          Click image for larger version

Name:	LT204a.png
Views:	804
Size:	940.5 KB
ID:	1190129
                          Click image for larger version

Name:	LT204b.png
Views:	794
Size:	850.5 KB
ID:	1190130
                          Clayton G.NinjaTrader Customer Service

                          Comment


                            #14
                            It works great now after changing the trading hours! Thank you so much Clayton!

                            Comment


                              #15
                              Can I ask a stupid question NinjaTrader_Clayton , why can't I just use the following for the dataseries NQ?

                              (a) "Use instrument setting"
                              (b) "Default 24 x 5"

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by port119, Today, 02:43 PM
                              0 responses
                              1 view
                              0 likes
                              Last Post port119
                              by port119
                               
                              Started by Philippe56140, Today, 02:35 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post Philippe56140  
                              Started by 00nevest, Today, 02:27 PM
                              0 responses
                              1 view
                              0 likes
                              Last Post 00nevest  
                              Started by Jonafare, 12-06-2012, 03:48 PM
                              5 responses
                              3,986 views
                              0 likes
                              Last Post rene69851  
                              Started by Fitspressorest, Today, 01:38 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post Fitspressorest  
                              Working...
                              X