Dukascopy
 
 
Wiki JStore Search Login

how to get the last price
 Post subject: how to get the last price Post rating: 0   New post Posted: Thu 03 Dec, 2015, 18:56 

User rating: 3
Joined: Mon 05 Nov, 2012, 11:56
Posts: 80
Location: Germany,
Hello,

Let's say the Close price of a 5 Minutes EURJPY candlestick (not the current one) is:

Close_Bid= 130.698
Close_Ask= 130.680

Now how do I know which price was the last transaction for the Close of this candlestick? The Bid or the Ask price??

Thanks


 
 Post subject: Re: how to get the last price Post rating: 0   New post Posted: Fri 04 Dec, 2015, 09:25 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

If you're long you close your transaction on the BID / if you're short then it is the ASK. In other words you always buy on the ask and sell on the BID except for PLace BID and place offer order types.

Cheers


 
 Post subject: Re: how to get the last price Post rating: 0   New post Posted: Fri 04 Dec, 2015, 11:26 

User rating: 3
Joined: Mon 05 Nov, 2012, 11:56
Posts: 80
Location: Germany,
amine_chourou wrote:
Hi,

If you're long you close your transaction on the BID / if you're short then it is the ASK. In other words you always buy on the ask and sell on the BID except for PLace BID and place offer order types.

Cheers


Hi,

Sorry but my question does not relate to order execution but rather technical analysis. How can I know if the last transaction in the past for the close of a bar was a BID or ASK price?


 
 Post subject: Re: how to get the last price Post rating: 0   New post Posted: Fri 04 Dec, 2015, 14:00 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Well it is the same:
technically speaking you call the last trade and identify it whether long or short and then once closed you'll get the price which is made on te appropriate side.
In VJF you'll use the variable "Position is long" to check the side and then once closed you have your BID or ASK price.
What is the idea behind this ? maybe there is an easier way to get this information ...

Cheers


 
 Post subject: Re: how to get the last price Post rating: 0   New post Posted: Fri 04 Dec, 2015, 14:29 

User rating: 3
Joined: Mon 05 Nov, 2012, 11:56
Posts: 80
Location: Germany,
amine_chourou wrote:
Well it is the same:
technically speaking you call the last trade and identify it whether long or short and then once closed you'll get the price which is made on te appropriate side.
In VJF you'll use the variable "Position is long" to check the side and then once closed you have your BID or ASK price.
What is the idea behind this ? maybe there is an easier way to get this information ...

Cheers


No..I'm talking about the last 100 "5 minutes" bars for a currency. You can see those bars in jforex either as BID or ASK bars. What I want is to see those candlesticks as last price bars. Therefore I must get to know for each bar what was the last transaction for the bar's close, open, high and low. was it either the ASK or BID price?

This has nothing to do with any trades/positions....


 
 Post subject: Re: how to get the last price Post rating: 0   New post Posted: Fri 04 Dec, 2015, 15:10 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
I see.
Then it is simply a matter of candle side subscription : when you 'call' candle's data you subscribe on BID or ASK prices and then you retrieve your OHLC prices with regards to the number of candles called.
This can be achieved using "Get historical candles" block to call the candle's data and then get the close BID / ASK

Cheers


 
 Post subject: Re: how to get the last price Post rating: 0   New post Posted: Fri 04 Dec, 2015, 16:00 

User rating: 3
Joined: Mon 05 Nov, 2012, 11:56
Posts: 80
Location: Germany,
amine_chourou wrote:
I see.
Then it is simply a matter of candle side subscription : when you 'call' candle's data you subscribe on BID or ASK prices and then you retrieve your OHLC prices with regards to the number of candles called.
This can be achieved using "Get historical candles" block to call the candle's data and then get the close BID / ASK

Cheers


Well this I have already done. I know how to get the bars BID and ASK prices but my problem is that I don't know which price came last, the BID or the ASK....because in jforex both BID and ASK "5 minutes" bars have the same timestamp:
one example:
BID: 1447202700000 -- 2015-11-11 00:45
ASK: 1447202700000 -- 2015-11-11 00:45

so that I cannot decide if either the Close_BID or the Close_ASK came last for a certain bar.

So imagine during a 5 minutes bar there are a lot of Ask and Bid prices forming that bar, at the end of the 5 minute interval the last price will be either a Bid or a Ask price which will become the Close price of that bar. my question was how to determine which price was the last one (last transaction) for this bar? the Ask or the Bid price?

Thanks


 
 Post subject: Re: how to get the last price Post rating: 0   New post Posted: Fri 04 Dec, 2015, 17:25 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Le me clarify something:

There is 2 sets of candles, each one is made with a price side. So basically the Ask prices are building their own candles and same for BID prices. At least this is the way we build our charts in any platform you use @Dukascopy.
So basically the very last ASK price received @2015-11-11 00:45 will be the close price for the ASK candle and the same is applied for the BID candles.


 
 Post subject: Re: how to get the last price Post rating: 0   New post Posted: Fri 04 Dec, 2015, 17:54 

User rating: 3
Joined: Mon 05 Nov, 2012, 11:56
Posts: 80
Location: Germany,
amine_chourou wrote:
Le me clarify something:

There is 2 sets of candles, each one is made with a price side. So basically the Ask prices are building their own candles and same for BID prices. At least this is the way we build our charts in any platform you use @Dukascopy.
So basically the very last ASK price received @2015-11-11 00:45 will be the close price for the ASK candle and the same is applied for the BID candles.



exactly this is causing me problems..I cannot determine what was the last transaction of the candle --> Did the Ask or Bid price arrive as last one(in time) for this candle?

if you have a look at [url]prorealtime.com[/url] currency charts You'll see that they do not provide separate Ask and Bid charts just one chart which shows the price of the last transaction (without consideration if it was a bid or a ask price).

Here is the definition of the last price:

https://daytrading.about.com/od/daytradi ... skLast.htm



Cheers


 
 Post subject: Re: how to get the last price Post rating: 0   New post Posted: Mon 07 Dec, 2015, 11:53 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

If you check the charts set as table, you can see that for every time stamp there is BID and ASK prices which are used to build each set of candles. This is the way the charts are built in Dukascopy and if you need a single price you may consider a median price for instance or consider Ask an Bid prices based on the side where the strategy will trade/generate a signal (Buy Vs Sell)
Hope this helps ...

Cheers


 
 Post subject: Re: how to get the last price Post rating: 0   New post Posted: Mon 07 Dec, 2015, 12:30 

User rating: 3
Joined: Mon 05 Nov, 2012, 11:56
Posts: 80
Location: Germany,
amine_chourou wrote:
Hi,

If you check the charts set as table, you can see that for every time stamp there is BID and ASK prices which are used to build each set of candles. This is the way the charts are built in Dukascopy and if you need a single price you may consider a median price for instance or consider Ask an Bid prices based on the side where the strategy will trade/generate a signal (Buy Vs Sell)
Hope this helps ...

Cheers


Hi,

Thanks for your suggestions but none of them will solve my issue.... To me this splitting the price chart into ASK and BID is like splitting a photo into two and trying to figure out the complete picture just looking at one half...is it possible to place a request to Dukascopy for a new feature?

Cheers


 
 Post subject: Re: how to get the last price Post rating: 0   New post Posted: Mon 07 Dec, 2015, 13:11 
Visual JForex expert at Dukascopy
User avatar

User rating: 288
Joined: Thu 18 Apr, 2013, 09:26
Posts: 1496
Location: Switzerland, Geneva
Hi,

Well you can still submit your request under Trading platforms >Feature requests section if you wish.
Actually I don't see where this could be blocking as any market has a BID and ASK prices and transactions are made on both sides.

Thanks for interacting in this forum anyway !

Cheers!


 

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