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.

Loading own historical data
 Post subject: Loading own historical data Post rating: 0   New post Posted: Sun 23 Oct, 2011, 22:47 

User rating: 0
Joined: Sun 23 Oct, 2011, 22:41
Posts: 24
Location: Ukraine,
Hi all,

Is it possible to load own historical data (for example, from database) and tests strategies on it? If it possible, how can I load this data, generate onTick events and calculate indicators? Do you have some code examples with same functionality?

Thank you!


 
 Post subject: Re: Loading own historical data Post rating: 0   New post Posted: Mon 24 Oct, 2011, 09:52 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
BogdanIvaniuk wrote:
Is it possible to load own historical data (for example, from database) and tests strategies on it? If it possible, how can I load this data, generate onTick events and calculate indicators?
At current API implementation it is not possible to use your own, custom historical data.
BogdanIvaniuk wrote:
Do you have some code examples with same functionality?
We don't have such examples at the moment. It is possible to implement it, but it would require a reasonable amount of coding. To outline, one would need to do the follwowing:
1) Make a mock implementation of IContext and its relevant interfaces (in this case IHistory, IIndicators).
2) Make mock implementations of related interfaces (e.g. ITick, IBar, IIndicator, IIndicatorInfo).
3) Make your own strategy running engine, that would pass the custom tick and bar data to the strategy and would run the strategy itself.
4) Also you would need to ensure that IHistory and IIndicators use the same data that you pass to the strategy.


 
 Post subject: Re: Loading own historical data Post rating: 0   New post Posted: Mon 24 Oct, 2011, 11:59 

User rating: 0
Joined: Sun 23 Oct, 2011, 22:41
Posts: 24
Location: Ukraine,
Thank you for your answer! I'll try to do it.


 

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