Hello,
I would like my strategy to retrieve the 6 previous daily bars.
I've found the IHistory.getBars method and have used it as follows.
long prevBarTime = history.getPreviousBarStart(Period.DAILY, askBar.getTime());
List<IBar> askBars = history.getBars(Instrument.EURUSD, Period.DAILY, OfferSide.ASK, Filter.WEEKENDS, 6, prevBarTime, 0);
The problem I've run into is the start time of the daily bars, they have a start time of midnight.
Which threw me because when you download historical data to CSV files or view daily bars in JForex they start at 21:00 (or 22:00 for parts of the year).
What I'm trying to get to is 1 bar for Sunday through Monday and 1 bar Monday through Tuesday etc... rather than 24 hour periods.
Is this possible?
Regards