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.

GetClose() GetOpen()
 Post subject: GetClose() GetOpen() Post rating: 0   New post Posted: Fri 27 Nov, 2009, 16:37 

User rating: 0
Joined: Fri 27 Nov, 2009, 16:30
Posts: 3
Hi there,

I'm trying to get the close and open of the previous bar with this code:

IBar bar = history.getBar(instrument, Period.ONE_MIN, OfferSide.BID, 1);

double iClose = bar.GetClose();
double iOpen = bar.GetOpen();

And I'm getting an error: The method GetOpen() is undefined for the type IBar
and same for GetClose.

Please advice.

Thanks.


 
 Post subject: Re: GetClose() GetOpen() Post rating: 0   New post Posted: Mon 30 Nov, 2009, 10:51 

User rating: 0
Joined: Fri 27 Nov, 2009, 16:30
Posts: 3
Hi there,

I've just realized that java is case sensitive so it should be getOpen() not GetOpen().
Sorry, I am a real newbie :)


Thanks
Ondrej


 

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