Dukascopy
 
 
Wiki JStore Search Login

Volume transacted at the Bid vs volume transacted at the ask
 Post subject: Volume transacted at the Bid vs volume transacted at the ask Post rating: 0   New post Posted: Sat 09 Feb, 2013, 23:16 
User avatar

User rating: 8
Joined: Tue 25 Oct, 2011, 23:02
Posts: 74
Location: Australia, Melbourne
Dear Support,

If I take volume input feeds from OfferSide.BID and OfferSide.ASK, what do the respective volume data arrays indicate?

Basically I'm trying to find out how I might obtain volume transacted at the bid for a tick vs volume transacted at the ask - these are good indicators of buying and selling pressure.
If I can't obatin volume transacted at the bid and ask from the input price/volume series, how would I go about getting it?


 
 Post subject: Re: Volume transacted at the Bid vs volume transacted at the ask Post rating: 0   New post Posted: Mon 11 Feb, 2013, 08:16 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
Please provide an example strategy which represents the problem


 
 Post subject: Re: Volume transacted at the Bid vs volume transacted at the ask Post rating: 0   New post Posted: Wed 13 Feb, 2013, 00:47 
User avatar

User rating: 8
Joined: Tue 25 Oct, 2011, 23:02
Posts: 74
Location: Australia, Melbourne
this is more of a query than a specific problem, although I would like some guidance...

I'd like to write some indicators (rather than strategies) for examining volume, specifically to identify patterns in volume transacted at the bid or volume transacted at the ask. I'm currently not certain what the volume array for bar or price inputs with OfferSide.ASK or OfferSide.bid actually represents.

There are a number of possibilities

1/ OfferSide.BID, volume (say for a 1M bar or 1HR bar) contains an array of the total volume of all the buy market and limit orders PLACED (regardless of what price) in each 1m or 1hr, OfferSide.ASK , volume contains the same but for all sell orders - regardless of whether or not these orders were actually transacted (i.e. orders could be placed not filled, and then cancelled or expired)

2/ OfferSide.BID, volume (say for a 1M bar or 1HR bar) contains an array of the total volume of all the buy market and limit orders that TRANSACTED (at a specific price) in each 1m or 1hr. OfferSide.ASK , volume contains the same but for all sell orders - that were actually transacted (i.e. orders were placed and filled, NOT placed then cancelled or expired)

3/ OfferSide.BID, volume (say for a 1M bar or 1HR bar) contains an array of the total volume of all the market and limit orders that TRANSACTED at the current BID price at the time the order was FILLED in each 1m or 1hr. OfferSide.ASK, volume contains the same but for all sell orders that were actually transacted at the ASK (i.e. orders were placed and filled at the current ASK price at the time of fill).

(and probably others too, but these are the main options I can think of)

I'm interested in getting the data for (3) so I can examine the delta between volume transacted at the BID and volume transacted at the ASK because this is the best real time measure of sentiment of current market participants.


 
 Post subject: Re: Volume transacted at the Bid vs volume transacted at the ask Post rating: 0   New post Posted: Wed 13 Feb, 2013, 15:47 
User avatar

User rating:
Joined: Fri 31 Aug, 2007, 09:17
Posts: 6139
1H Bid bar volume is aggregated from tick bid volumes over the given hour.


 
 Post subject: Re: Volume transacted at the Bid vs volume transacted at the ask Post rating: 0   New post Posted: Fri 15 Feb, 2013, 01:19 
User avatar

User rating: 8
Joined: Tue 25 Oct, 2011, 23:02
Posts: 74
Location: Australia, Melbourne
API Support wrote:
1H Bid bar volume is aggregated from tick bid volumes over the given hour.


Really that isn't an answer to my question.

Perhaps I can explain in more detail. Let's consider the Depth of Market (order book) for a second.

let's say we have an order book (DOM) for an instrument that looks like this:

BUY side - 61 contracts BID at 1.1650
SELL side - 17 contracts OFFER at 1.1652

We can see that the highest bid is 1.1650 and that there are 61 contracts bid at that price. The lowest offer is for 1.1652 and there are 17 contracts offered there. These are limit (not market) orders. No doubt there are other bidders and sellers at other prices further away from this spread but for the purpose of this discussion we can ignore them.

With the order book as above, no transaction will take place.

However, if someone is strongly motivated to BUY a contract, they can raise their bid and enter a market order to buy 1 contract - which would see them buying from the seller at 1.1652. (This then gets matched with one of the 17 contracts offered at 1.1652). On other platforms, that TRANSACTED exchange (1 contract volume at 1.1652) gets recorded on the Time and Sales list (usually in green, to denote hitting the offer). If someone is strongly motivated to SELL - they can lower their offer and enter a market order to sell which would see them selling to the buyer at 1.1650 (and 1 contract volume is exchanged at 1.1650, which gets recording on typical Time and Sales in red as volume that "hit the bid"). In either case, 1 contract is exchanged, and this will add to the volume recorded, but hitting the bid and hitting the order are different situations, and quite a lot of useful information can be drawn distinguishing between the two.

So, are you saying that for OfferSide.BID, the volume datum for a 1HR candle feed is the
1/ total volume of transactions in the hour (i.e all volume transacted regardless of whether it "hit the bid" or "hit the offer")
2/ total volume of the transactions at the inside bid (i.e the volume transacted which "hit the bid").

If 1/, then what is the volume datum for OfferSide.ASK, and why is it different to volume for OfferSide.BID?


 
 Post subject: Developing a Trend Indicator based upon the Depth of Market Post rating: 4   New post Posted: Fri 15 Feb, 2013, 11:44 
User avatar

User rating: 98
Joined: Mon 23 Jul, 2012, 02:02
Posts: 656
Location: United States, Durham, NC
Quote:
Basically I'm trying to find out how I might obtain volume transacted at the bid for a tick vs volume transacted at the ask - these are good indicators of buying and selling pressure.


I think you may misunderstand the meaning of quoted size at tiers.

There is no record of "transactions", also known as Time and Sales, in Forex trading. It seems you are using examples from futures trading, for example, where there is Time and Sales to analyze.

But it is entirely possible, in Forex, to derive trend information from the Depth of Market, which I do all the time. But it is not simple straightforward analysis and has to be treated statistically.

In fact, market price moves to larger quoted size on the DOM but measuring this in a useful way is extremely difficult. Trying to get it from bar information which is historically derived, won't work, so you'll have to do realtime analysis on a tick basis of the available DOM to derive the information you're looking for. That's something I do all the time but it's a lot of analysis, and isn't backtestable, etc. because the historical tick stream isn't identical to the live stream in subtle ways.

Indirect assumptions might be made. For example, if size disappears from a Bid tier one might assume either 1) that sellers to the Bid "consumed" that size (implying a "transaction") or FAR MORE LIKELY, that 2) the Bid size was simply "pulled" from the book, NOT at all implying that any transaction took place, simply that Bidding at that price was no longer desirable. Again, since there is no Time and Sales, any assumptions about transactions are, at best, rather speculative (but can still be useful in predicting short term price movements).

This is a design discussion for an indicator, or an analytic approach, which probably isn't going to be addressed in this technical forum. Trading is all about Big players versus the rest of us, and there are only a few Big players. They dominate the DOM and, since they take the opposite side of any transaction against small "retail" players, they place size where the market WILL BE in the future, when they cause it to move. For that reason, a DOM-based predictor is the ultimate "leading indicator" since size is placed slightly before the price move takes place.

For example, a Market Mover could place size on the ASK, let's say, 0.5 pips above the current inside ASK price, call this the "target price". Then MM simply "pulls" or remove all of her ASK offers below that price and, very suddenly, the ASK price is exactly at the previously placed target. That's what happens. At that moment, retail players will react to the rising price, they tend to BUY ("hitting" the ASK) and she (the MM) sells to them, since she always takes the opposite side of any retail transactions. This is how MM influences the actions of retail traders. We would say that MM operates in a "wholesale" mode, or that MM always sells the ASK and buys the BID ("makes the spread"), but we smaller retail players are forced to buy to the ASK and sell to the BID price ("pay the spread"), almost all of the time. MM is also "proactive", influencing the moves, while we retail players are "reactive" and hoping to predict the moves, etc.

Depth of market or "quote pattern analysis" is probably beyond the scope of this forum. One possible graphical approach is shown in the attached screenshot.

Dukascopy JForex kindly gives us a tick by tick Depth of Market in the IStrategy.onTick callback method. Your challenge is to process this in real time :) without holding up the callback thread. I do this by capturing and double buffering the incoming data, and processing it as fast as possible, while releasing the callback for the next IStrategy.onTick event.

HyperScalper


Attachments:
File comment: Same analysis slightly later in time.
ExampleQuotePatternAnalysisSlightlyLater.PNG [175.19 KiB]
Downloaded 621 times
File comment: Possible analysis of Quote Patterns on the DOM for EURUSD
ExampleQuotePatternAnalysis.PNG [177.26 KiB]
Downloaded 559 times
DISCLAIMER: Dukascopy Bank SA's waiver of responsability - Documents, data or information available on this webpage may be posted by third parties without Dukascopy Bank SA being obliged to make any control on their content. Anyone accessing this webpage and downloading or otherwise making use of any document, data or information found on this webpage shall do it on his/her own risks without any recourse against Dukascopy Bank SA in relation thereto or for any consequences arising to him/her or any third party from the use and/or reliance on any document, data or information found on this webpage.
 
 Post subject: Re: Volume transacted at the Bid vs volume transacted at the ask Post rating: 0   New post Posted: Tue 19 Feb, 2013, 00:59 
User avatar

User rating: 8
Joined: Tue 25 Oct, 2011, 23:02
Posts: 74
Location: Australia, Melbourne
Thanks, that's a a very interesting reply, and you may well be right about the time and sales. I certainly understand that the DOM tiers represent limit orders which can and often are withdrawn. Not exactly sure how it works with Duksacopy, particular what information is retained about transaction, and the difference between bid and ask volume, hence this question.

Dear support - please note that my questions above still are not answered. If you can give me a reply, that would be much appreciated.


 

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