Post subject: Minimum lookback of data at strategy startup
Post rating: 0
Posted: Sun 29 Dec, 2013, 19:35
User rating: 0
Joined: Sun 29 Dec, 2013, 19:26 Posts: 1 Location: Australia,
Hello,
I would like to know the best method to request a minimum lookback of data at strategy startup. For example, to require at least 7 days of 1min data is loaded in order to generate custom indicator rules and entry/exit levels. The end date/time would be the current time/strategy runtime.
I was looking at the history.readBars() method. Is there any significant benefit to caching the market data or is it better to have more 'refreshed' and possible more recently cleansed data by calling history.getBars().
Thank you kindly for any assistance. Alby
API Support
Post subject: Re: Minimum lookback of data at strategy startup
I was looking at the history.readBars() method. Is there any significant benefit to caching the market data or is it better to have more 'refreshed' and possible more recently cleansed data by calling history.getBars().
It is not that much about the caching, rather that you don't have to load all the data into the RAM, but you can pick certain price/time values without keeping the bar in the memory.