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.

Filters for readBars
 Post subject: Filters for readBars Post rating: 0   New post Posted: Thu 11 Feb, 2010, 00:16 

User rating: 0
Joined: Wed 10 Feb, 2010, 14:09
Posts: 8
I want to use the following version of readBars, but it doesn't seem to support filtering of flats.

com.dukascopy.api.IHistory.readBars(Instrument instrument, Period period, OfferSide side, long from, long to, LoadingDataListener barListener, LoadingProgressListener loadingProgress) 


It seems to be too much trouble to try to working out then number of bars candles between two dates that are more than a few days apart, so I would rather not use the alternative version.

com.dukascopy.api.IHistory.readBars(Instrument instrument, Period period, OfferSide side, Filter filter, int numberOfCandlesBefore, long time, int numberOfCandlesAfter, LoadingDataListener barListener, LoadingProgressListener loadingProgress)


Can you help?


 
 Post subject: Re: Filters for readBars Post rating: 0   New post Posted: Mon 15 Feb, 2010, 10:46 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
you should use the second function with Filter type parameter.
Use functions such as IHistory.getBarStart to calculate correct bar start time and IHistory.getBars(Instrument instrument, Period period, OfferSide side, long from, long to) to get candle count between to dates.


 

Jump to:  

cron
  © 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