Dukascopy Support Board http://www.dukascopy.com/swiss/english/forex/jforex/forum/ |
|
Filter parameter missing in IHistory methods http://www.dukascopy.com/swiss/english/forex/jforex/forum/viewtopic.php?f=83&t=57754 |
Page 1 of 1 |
Author: | gipadm [ Tue 21 Dec, 2021, 13:16 ] |
Post subject: | Filter parameter missing in IHistory methods |
Similar to methods that have 2 versions - without filter and with filter: getBars(Instrument instrument, Period period, OfferSide side, long from, long to) Please add method overloading where it is needed, like here: getBar(Instrument instrument, Period period, OfferSide side, int shift) |
Author: | vadim_berezhnoj [ Thu 06 Jan, 2022, 14:39 ] |
Post subject: | Re: Filter parameter missing in IHistory methods |
Greetings. Methods getTimeForNBarsForward, getTimeForNBarsBack, getPreviousBarStart implemented as simple calendar calculations - they don't take into account trading breaks schedule. You can use com.dukascopy.api.IHistory#getBars(com.dukascopy.api.Instrument, com.dukascopy.api.Period, com.dukascopy.api.OfferSide, com.dukascopy.api.Filter, int, long, int) method to load necessary number of bars and take time from corresponding bar. Method getBar(Instrument instrument, Period period, OfferSide side, int shift) determines time of requested bar in the same manner, therefore it also can't use Filter. Regards. |
Page 1 of 1 |