Indicators - usage with context.getHistory() derived prices
[wheelsofsteel]
Post subject: Indicators - usage with context.getHistory() derived prices
Post rating: 0
Posted: Sat 01 Jan, 2011, 11:40
User rating: 0
Joined: Sat 01 Jan, 2011, 11:29 Posts: 6
I am trying to back-test one of my strategies using Eclipse and the various jars, etc. All builds and works so far, but I have a question on how I should use Indicators, if running using prices derived from the getHistory() call.
At the moment, I have added a section to the onStart() method to build price bar lists on history.getBars(). However, as much as I can call my strategies main entry-point onBar(), passing in the historic values, I have a number of methods that subsequently use technical indicators as part of the Indicators class - these seem to only be based on 'real-time' date and certain offsets from that point?
How can I use the Indicators with historic data? For example if I wanted a simple moving average (sma) of 50 bars from a date/time 4 month ago, not 50 bars from the actual system/real date.
Thanks,
[wheelsofsteel]
Post subject: Re: Indicators - usage with context.getHistory() derived pri
Post rating: 0
Posted: Tue 04 Jan, 2011, 11:28
User rating: 0
Joined: Sat 01 Jan, 2011, 11:29 Posts: 6
bump
API Support
Post subject: Re: Indicators - usage with context.getHistory() derived pri