I bring this topic up again, as I do have this issues with Europe and US right now. At the moment I use the TWS IB data. Normaly the time shift between CET und NY Time is 6 hours. Right now it is 5 hours. So this confuses the database. The US markets opens at 14:30 and closes at 21:15. And if I want to filter for day session only I see my US data between 15:30 and 22:15. Is there no better way to handle this time problem in Amibroker when US and Europe are changing to summer/winter time on different weekends? Any solutions?
Kind regards, dubi --- In [email protected], "Graham" <gkavan...@...> wrote: > > I have created a small routine to make the appropriate changes for the > upcoming summer time changes in US and Australian eastern states (no time > changes where I live, but the ASX market is in east states). I believe the > US and Aust change on the same date again so the changes only need to be > done once. I use quotetracker for intraday data and this arrives as US EST > (ESST) so in my summer the time shift is +16 hours and in winter +14 hours. > Previously I used to export the data to excel and change the times there > which was laborious and boring. Now the improvements in AB make this simple > and easy. > Btw if you do not make the mods to the historical intraday data the times > will not be consistent throughout your data. > Here is the instructions and code, hope this helps someone > > > > /* > > CHANGING ALL DATA FOR SUMMER TIME CHANGES > > Datafeed through QT is in US EST which changes with the seasons daylight > saving. About the same time (if lucky on same weekend) Australian eastern > states change summer time (in reverse). So we have in Aust summer time shift > +16 hours AND in winter +14 hours > > To change the times for summer timezone changes US & Australian for the > historical saved data in Amibroker I use the following:- > > For Export: > > Databse Settings - Intraday Settings - > > In March - change the time shift to +2 hrs to adjust for winter time > > In November - change the time shift to -2 hrs to adjust for summer time > (Nov) > > Export intraday and EOD data to TXT files > > One file for each stock > > In the first line insert the directory you want to save them to, make sure > the directory exists > > Select your charts to export with the "Apply to" filter in AA window > > Select the timeframe period you want to save as using the AA "Settings" > > Press Scan button > > The data is now saved to txt files with US times adjusted for the next > timezone season. > > To Create the new database for new season > > Remove all data from the existing database (or create new one) > > Make the time shift in Database Settings - Intraday Settings to 0 (zero) > > Import the adjusted data with the import wizard. > > Now ready to rock and roll > > Oh sometimes the US and Aust do not change summer time on same weekend and > this needs to be done twice with 1 hour adjustment each time :( > > by Graham Kavanagh 05 Mar 2004 > > */ > > fh = fopen( "c:\\SaveData\\"+Name()+".txt", "w"); > > if( fh ) > > { > > fputs( "Ticker,Date,Time,Open,High,Low,Close,Volume \n", fh ); > > y = Year(); > > m = Month(); > > d = Day(); > > r = Hour(); > > e = Minute(); > > n = Second(); > > for( i = 0; i < BarCount; i++ ) > > { > > fputs( Name() + "," , fh ); > > ds = StrFormat("%02.0f-%02.0f-%02.0f,", > > y[ i ], m[ i ], d[ i ] ); > > fputs( ds, fh ); > > ts = StrFormat("%02.0f:%02.0f:%02.0f,", > > r[ i ],e[ i ],n[ i ] ); > > fputs( ts, fh ); > > qs = StrFormat("%.4f,%.4f,%.4f,%.4f,%.0f\n", > > O[ i ],H[ i ],L[ i ],C[ i ],V[ i ] ); > > fputs( qs, fh ); > > } > > fclose( fh ); > > } > > Buy = 0; > > > > > Cheers, > Graham > http://e-wire.net.au/~eb_kavan/ >
