Dukascopy
 
 
Wiki JStore Search Login

How to get previous Bar filter weekends?
 Post subject: How to get previous Bar filter weekends? Post rating: 0   New post Posted: Mon 10 Sep, 2018, 07:14 

User rating: 2
Joined: Mon 30 Apr, 2018, 12:38
Posts: 17
Location: ChinaChina
The method: history.getBar(Instrument.EURUSD,Period.Daily,OfferSide.BID,1) only return previous bar,if the time at the open, the method return weekend
bars without filter,how to get previous bar without weekend?
HELP PLEASE!


 
 Post subject: Re: How to get previous Bar filter weekends? Post rating: 0   New post Posted: Wed 12 Sep, 2018, 10:31 

User rating: 18
Joined: Thu 20 Apr, 2017, 22:42
Posts: 165
Location: Russian Federation,
See
public interface IHistory {
  List<IBar> getBars(Instrument instrument, Period period, OfferSide side, Filter filter, long from, long to) throws JFException;

Filter.WEEKENDS should work for you.


 
 Post subject: Re: How to get previous Bar filter weekends? Post rating: 0   New post Posted: Sun 16 Sep, 2018, 04:18 

User rating: 2
Joined: Mon 30 Apr, 2018, 12:38
Posts: 17
Location: ChinaChina
Thanks a lot, that helps me.


 

Jump to:  

  © 1998-2024 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