Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

Cache Instrument Historical Bars
 Post subject: Cache Instrument Historical Bars Post rating: 0   New post Posted: Fri 17 Aug, 2012, 08:50 

User rating: 0
Joined: Fri 17 Aug, 2012, 08:42
Posts: 2
Hi,

I need to cache the Hourly bars for the past 30 days for 28 instruments. Then I want to use this data to calculate values for indicators.
If I download the data when calculating the indicator, it takes too long and freezes the program. Also this cache need to be updated as new bars come in.

What is the best way to do this?
Also, If I cache 15 Min data can I use 1 Hour bars using that 15 min data or do I need to cache both?

Thanks


 
 Post subject: Re: Cache Instrument Historical Bars Post rating: 0   New post Posted: Mon 27 Aug, 2012, 08:28 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
For indicator calculation you don't need to cache the bars, see:
https://www.dukascopy.com/wiki/#Indicator_Calculation


 
 Post subject: Re: Cache Instrument Historical Bars Post rating: 0   New post Posted: Fri 31 Aug, 2012, 21:05 

User rating: 0
Joined: Fri 17 Aug, 2012, 08:42
Posts: 2
How can I do this for custom indicator? For example my indicator needs High/Low for each of the last 100 bars. What is the best way to store and automatically update this data without downloading it every time?

Thanks


 
 Post subject: Re: Cache Instrument Historical Bars Post rating: 0   New post Posted: Mon 03 Sep, 2012, 10:18 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Thunder99 wrote:
For example my indicator needs High/Low for each of the last 100 bars.
Then you need to update your indicator to use the lookback of 100. Then on every IIndicator.calculate you will receive at minimum 101 inputs. See more here:
https://www.dukascopy.com/wiki/#IIndicator_interface/Method_getLookback


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com