Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi timeframe - sync error dependent on timezone

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

    Multi timeframe - sync error dependent on timezone

    Fundamentally DataSeries[0] should refer to the most recent bar as described in your documentation. This is not the case depending on what timezone
    setting one has on their local pc.

    The output below was created as follows

    1) In Historical Data Manager delete existing data for symbol GS
    2) Export minute data for stock "GS" out of TradeStation using local pc Timezone = "US Eastern"
    3) Import Data Into NT specifying data timezone = "US Eastern"
    4) Chart 1 Minute Bars for GS
    5) Open Output Window (Tools -> Output Window)
    6) Insert attached indicator "SyncErrorDependentOnTimeZone"

    creates the following output...

    GS Timestamp: 08-Feb-11 4:00:00 PM; GS Value: 168.56; GSDaily Timestamp: 08-Feb-11 4:00:00 PM; GSDaily Value: 168.57;

    GS Timestamp: 09-Feb-11 4:00:00 PM; GS Value: 165.93; GSDaily Timestamp: 09-Feb-11 4:00:00 PM; GSDaily Value: 165.61;

    GS Timestamp: 10-Feb-11 4:00:00 PM; GS Value: 165.28; GSDaily Timestamp: 10-Feb-11 4:00:00 PM; GSDaily Value: 165.05;

    Checking the Historical Data Manager reveals the daily closing prices are correct:

    10-Feb-11 165.27 166.65 164.68 165.05 3960805
    09-Feb-11 168.23 168.23 164.66 165.61 5251600
    08-Feb-11 167.0 168.72 166.26 168.57 4441497

    change pc timezone to somewhere east of Tehran, restart NT

    1) In Historical Data Manager delete existing data for GS
    2) Export minute data for stock "GS" out of TradeStation using local pc Timezone = "Brisbane"
    3) Import Data Into NT specifying data timezone = "Brisbane"
    4) Chart 1 Minute Bars for GS
    5) Open Output Window (Tools -> Output Window)
    6) Insert attached indicator "SyncErrorDependentOnTimeZone"

    GS Timestamp: 09-Feb-11 7:00:00 AM; GS Value: 168.56; GSDaily Timestamp: 09-Feb-11 7:00:00 AM; GSDaily Value: 167.01;

    GS Timestamp: 10-Feb-11 7:00:00 AM; GS Value: 165.93; GSDaily Timestamp: 10-Feb-11 7:00:00 AM; GSDaily Value: 168.57;

    GS Timestamp: 11-Feb-11 7:00:00 AM; GS Value: 165.28; GSDaily Timestamp: 11-Feb-11 7:00:00 AM; GSDaily Value: 165.61;

    GS Timestamp: 12-Feb-11 7:00:00 AM; GS Value: 166.7; GSDaily Timestamp: 12-Feb-11 7:00:00 AM; GSDaily Value: 165.05;

    11-Feb-11 165.27 166.65 164.68 165.05 3960805
    10-Feb-11 168.23 168.23 164.66 165.61 5251600
    09-Feb-11 167.0 168.72 166.26 168.57 4441497
    08-Feb-11 164.79 168.1 164.6 167.01 4554974

    The Following Minute Bars Line Up

    GS Timestamp: 08-Feb-11 4:00:00 PM; GS Value: 168.56 ... equals ... GS Timestamp: 09-Feb-11 7:00:00 AM; GS Value: 168.56;

    However the most recent daily bars are different

    GSDaily Timestamp: 08-Feb-11 4:00:00 PM; GSDaily Value: 168.57 ... NOT ... GSDaily Timestamp: 09-Feb-11 7:00:00 AM; GSDaily Value: 167.01;

    ===

    When the exchange closed at 4:00 on 08-Feb the price was 168.57 Which corresponded to a local (Brisbane) time of 7:00am on 9-Feb however
    the price was not 167.01.

    Conclusions

    1) Timestamp does not match the price at this time (Times[Instrument1_Daily][0])
    2) Data of different timeframes are not aligned.
    3) For a given market and multi-timeframe strategy, you will get different output / trades, depending on what you set your timezone to.

    Is this correct?

    Nick
    Attached Files

    #2
    Nick, are you changing the timezone of your PC or just in the export options of TradeStation? When you import, did you check the box to build daily bars from minute data?
    AustinNinjaTrader Customer Service

    Comment


      #3
      Hi Austin,

      I'm changing the timezone of the pc. Tradestation data is then always displayed in Local time as indicated in the instructions for exporting TS data to NinjaTrader. When importing TS data I select the timezone of the pc as this corresponds to the local timestamps of the TS data, yes I am building daily bars from minute bars.

      Comment


        #4
        symbol, thanks for the reply. I will have someone get back to you on Monday.
        AustinNinjaTrader Customer Service

        Comment


          #5
          symbol, it would be important to know what session templates you're using to create your charts in NT for testing and then secondly in which timezone those session templates are setup under Tools > Session Manager?
          BertrandNinjaTrader Customer Service

          Comment


            #6
            The session template is US Equities RTH. In Session Manager this is associated with (GMT -05:00) Eastern Time.

            Comment


              #7
              symbol, you cannot use the this session template then to chart your data in non EST - please try picking for example the SNFE template to have a template working in the correct timezone.
              BertrandNinjaTrader Customer Service

              Comment


                #8
                Thanks Bertrand, Setting Local Time = Sydney, the GS stock ticker trades from 1:30 AM to 8:00 AM local time. I can plot this with the Default 24/7 template. When I change to the Sydney Futures Exchange (SNFE) template with a session of 9:50 to 4:30 Sydney time, nothing is plotted... The Snfe RTH template is associated with GMT+10:00... in the session manager (ie local exchange time). So still stuck here...

                Comment


                  #9
                  Hmm, I thought you were attempting to correctly plot daily bars from this data - the actual session hours set would not matter, it would always be shown what the provider included in the day's bar data, however for alignment and correct plotting the timezone of the used session template would matter, hence my SNFE suggestion - if you could contact me at support at ninjatrader dot com with the GS data you used I would like to give this a run on my end to investigate closer for you.

                  Thanks in advance,
                  BertrandNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by tkaboris, Today, 06:44 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post tkaboris  
                  Started by TraderKnG, 06-22-2024, 01:30 AM
                  1 response
                  18 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by nobchi, 06-22-2024, 01:05 AM
                  1 response
                  7 views
                  0 likes
                  Last Post NinjaTrader_LuisH  
                  Started by jalley, 03-22-2021, 12:17 PM
                  5 responses
                  136 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Started by rbeckmann05, 06-21-2024, 03:45 PM
                  1 response
                  10 views
                  0 likes
                  Last Post NinjaTrader_Gaby  
                  Working...
                  X