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.

IBar.getClose() giving strange results
 Post subject: IBar.getClose() giving strange results Post rating: 0   New post Posted: Fri 05 Feb, 2010, 14:56 

User rating: -
Hi there guys,
i'm just beginning writing code for JForex. I'm currently having issues when I try to access former candles via IHistory.
I have an example code attached:
public void onTick(Instrument instrument, ITick tick) throws JFException {        
        console.getOut().println(history.getBar(instrument, Period.FIVE_MINS, OfferSide.BID, 1).getClose());       
}


I would now expect that the same value would be written to the Log until there would be a new Bar. But it is not, in fact i get these:
Quote:
13:48:05 89.67
13:48:05 1.07265
13:48:05 1.07265
13:48:05 1.3709
13:48:05 1.5703
13:48:05 1.3709
13:48:05 1.5703
13:48:04 1.07265
13:48:04 1.3709
13:48:04 89.67
13:48:04 1.5703
13:48:04 1.07265
13:48:04 89.67
13:48:04 1.3709


Did I miss something, are those Bars used differently?

greetings,
gieser


 
 Post subject: Re: IBar.getClose() giving strange results Post rating: 0   New post Posted: Fri 05 Feb, 2010, 16:53 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
our strategies run on all instruments that are available (subscribed) to the platform. That's why there is the Instrument parameter. You are seeing prices for different instruments


 

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