@backtrader I see. I have been playing around with the values trying to match the behavior that was described in the docs.
However I'm running into some issues - here is my call to oandatest.py
python oanda.py --token XXX --account 1401188 --data0 EUR_USD --timeframe Minutes --compression 60 --replay
From what I understand my prenext and next calls should be called every minute. However, my data output is as follows:
-- Contract Details:
{u'pip': u'0.0001', u'instrument': u'EUR_USD', u'maxTradeUnits': 10000000, u'displayName': u'EUR/USD'}
Datetime, Open, High, Low, Close, Volume, OpenInterest, SMA
***** DATA NOTIF: DELAYED
Data0, 0021, 736447.833333, 2017-04-28T20:00:00.000000, 1.089340, 1.090030, 1.088955, 1.089620, 423, 0, 1.089734
Data0, 0022, 736449.875000, 2017-04-30T21:00:00.000000, 1.091305, 1.091305, 1.089240, 1.089750, 339, 0, 1.089668
Data0, 0023, 736449.916667, 2017-04-30T22:00:00.000000, 1.089710, 1.090345, 1.089520, 1.090245, 396, 0, 1.089683
Data0, 0024, 736449.958333, 2017-04-30T23:00:00.000000, 1.090265, 1.091120, 1.090265, 1.090590, 258, 0, 1.089904
Data0, 0025, 736450.000000, 2017-05-01T00:00:00.000000, 1.090615, 1.090790, 1.089965, 1.089965, 241, 0, 1.090034
Data0, 0026, 736450.041667, 2017-05-01T01:00:00.000000, 1.089985, 1.090080, 1.088930, 1.089280, 475, 0, 1.089966
Data0, 0027, 736450.083333, 2017-05-01T02:00:00.000000, 1.089300, 1.089695, 1.089235, 1.089385, 201, 0, 1.089893
Data0, 0028, 736450.125000, 2017-05-01T03:00:00.000000, 1.089365, 1.089465, 1.089135, 1.089330, 65, 0, 1.089710
Data0, 0029, 736450.166667, 2017-05-01T04:00:00.000000, 1.089305, 1.089370, 1.089035, 1.089080, 74, 0, 1.089408
Every printed line is still hourly, even though I would expect these lines to print out 60 times for each "hour".
I also have feelings that something is going on behind the scenes - Oanda only allows retrieval of 500 bars. If I am replaying data, this should be limited to 500 minutes, yet I am still able to fetch 500 hours worth of data.
What am I misunderstanding?