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.

get specified bar price
 Post subject: get specified bar price Post rating: 0   New post Posted: Tue 22 Mar, 2011, 18:28 

User rating: 0
Joined: Sun 20 Feb, 2011, 21:34
Posts: 10
Hello,all.

I need small knowledge.

I 'd like to get bar price(close,open,high,low,,,) which in time of opening position.
Adding if I can, it must be capable of being configured Period period.

Sorry, my English is poor.
I need your help.

You know the way of it?

Thanx. :roll: :roll: :roll: :roll: :roll: :roll: :roll: :roll: :roll: :roll: :roll: :roll:


 
 Post subject: Re: get specified bar price Post rating: 0   New post Posted: Wed 23 Mar, 2011, 08:31 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
Have a look at the following example:
IBar bar = context.getHistory().getBar(Instrument.EURUSD, Period.ONE_HOUR, OfferSide.ASK, 0);    //fetching a current bar (shift = 0)
context.getConsole().getOut().println("open: " + bar.getOpen() + ", close: " + bar.getClose() + ", high: " + bar.getHigh() + ", low: " + bar.getLow());


 
 Post subject: Re: get specified bar price Post rating: 0   New post Posted: Wed 23 Mar, 2011, 09:04 

User rating: 0
Joined: Sun 20 Feb, 2011, 21:34
Posts: 10
Thank your reply.

But saying honesty, I want the bar price specified timing(opened position) in past.

Sorry my mistake explaining.

Do you have the way?

I hope your reply, thanx..... :lol: :o :mrgreen: :mrgreen: :mrgreen: :mrgreen:


 
 Post subject: Re: get specified bar price Post rating: 0   New post Posted: Thu 24 Mar, 2011, 08:33 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Hi,
Please have a look at the following:
https://www.dukascopy.com/client/javadoc ... story.html
https://www.dukascopy.com/client/javadoc ... tFillTime()


 

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