[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Chart times drifting due to daylight savings



PureBytes Links

Trading Reference Links

Looking for some information on the easiest way to handle multiple time
zones in AmiBroker so that times for any symbol do not drift due to daylight
savings. As a simple example consider just 2 time zones. I have a chart for
a market in each of these 2 time zones, the 2 symbols are in the same
database. I use IB data which does not have a timestamp as a part of the
quote stream, so the charts display my local time. Chart1 (in timezone1, my
local timezone) has trading times of 10am-4pm. Chart2 (in timezone2) also
displays my local times (timezone1 times) and it's trading times (in my
local time) are 12pm-6pm. Timezone2 is actually 2 hours behind timezone1 so
the actual (timezone2) trading times for Chart2 is 10am-4pm. So the markets
have exactly the same trading times, they are just in different timezones.

Much of my trading is time-based so correct times are important. It does not
matter that chart2 displays times that are incorrect by 2 hours, as long as
the times for that market do not drift. Lets say that timezone1 switches to
daylight savings time. There is no problem for chart1 in timezone1 because I
simply adjust my computer clock to match daylight savings time and the chart
times remain the same as they did before, 10am-4pm. But timezone2 does not
have daylight savings (or it might start several weeks later), so the times
in Chart2 will now have times 1pm-7pm.

When timezone1 switches to daylight savings I want the times for my chart2
(in timezone2) to remain the same, i.e. 12pm-6pm. Does anyone know how to
achieve this. The Time Shift setting would do the trick but that setting
applies to the entire database.

Thanks
Dave