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

adding weekly data (very basic)...



PureBytes Links

Trading Reference Links

I asked some very basic questions a while back on combining a weekly
file with a daily file (and thanks to those who answered me). For
example, data1 is a daily file and data 2 is a weekly file. Since I
build my own files I ran into a problem with overlapping dates. This may
help other people who plan on doing the same thing.

The best way to explain this is by example. Let's say you build data1 as
a daily OHLC file, data2 as a daily indicator file, and data3 as a
weekly OHLC file. And let's say you have MaxBarsBack set to 52 and start
all files with a physical beginning date of 01/01/95. If you're lucky
enough not to get an overlap error then your 1st calc date in data1 is
about 01/01/96 because of the 52 bars back in the weekly data series. To
solve this problem, I added some code to my program to do the following:

1.	Had it write out the weekly file in its entirety. 
2.	Inputted MaxBarsBack into the program.
3.	Had the program write out data1 and data2 with a start date of
ActualPhysicalBegDate + (MaxBarsBack*7) + 8. The extra 8-day deal is
just for good measure.

This gave me the correct overlap and seemed to work with all the
possible MaxBarsBack settings. Anyway it works and hopefully this might
help someone. 

Robin