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