Dukascopy
 
 
Wiki JStore Search Login

我能在onBar{}那里获得不同周期的k线吗?
 Post subject: 我能在onBar{}那里获得不同周期的k线吗? Post rating: 0   New post Posted: Fri 26 Feb, 2016, 04:44 

User rating: 0
Joined: Thu 18 Sep, 2014, 16:50
Posts: 6
Location: China, nanning
你好。我能在onBar{}那里获得不同周期的k线吗?就是想同时获得5分钟k线和1分钟k线。如下这么写有没问题?
public void onBar(Instrument instrument, Period period, IBar askBar, IBar bidBar) throws JFException {
prevBar5 = history.getBar(selectedInstrument, Period.FIVE_MINS, OfferSide.BID,1);
prevBar1 = history.getBar(selectedInstrument, Period.ONE_MIN, OfferSide.BID,1);
}


 
 Post subject: Re: 我能在onBar{}那里获得不同周期的k线吗? Post rating: 0   New post Posted: Tue 15 Mar, 2016, 14:57 
Visual JForex expert at Dukascopy
User avatar

User rating: 1
Joined: Thu 29 Aug, 2013, 13:07
Posts: 88
Location: Ukraine, Kiev
您好,

请参照网页上的说明:https://www.dukascopy.com/wiki/#History_bars。


 

Jump to:  

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