Hi All,
I’ve found I need to do an aj over historical database, to retrieve either points in time or intervals of data. Realized quickly that aj doesn’t work straight out of the box. Has anybody done anything like this?
The logic I have is to group by points in time or intervals by sym and date, then for points, run a regular aj on the HDB, for the day but check if it doesn’t find anything, in which case, I need to decrement the date by one and run a where close of i=last i, till I find a date that actually has data (got to cover weekends). For intervals, I retreive the interval by aj and check if the first record has data and if not, do the same as described previously.
I’m also observing complications if trying to optimize retrieval by whole day per symbol.
Currently working on the code but wondering if somebody already done it and can save me a few hours.
For a real example, my HDB data has the following structure:
flip date
symtime
askbid
vaskvbid!(
date$();0#;
time$();real$();
real$();real$();
real$()) // this is the Dukascopy FX tick data HDB
while the retrieval is either a list of dates or a table with 2 dates, OpenDate and CloseDate (this being a set of FX trades).
Thanks,
John