# Calculating short/long order percentages?

I have a feed in real time that lists the ask and bid orders.

Each order consists of a value and a quantity.

I want to calculate the percentage of short orders from the total orders in terms of quantity.

So far i have this:

    Sum(askOrderQuantities)/( Sum(askOrderQuantities+ Sum(bidOrderQuantities))


As far as i know selling is not the same as short. most ask orders are way above market price. This means that they will not go through anytime soon. Does this mean they are long because the seller is betting the price will go up?

Edit: I am trying to find a percentage that represents people going short of the total market, weighing in the quantity they are using. This is for the forex market. I have the following data in real time:

   Order sheet
Ticker
Market trade history

-
Hi Sherif Eweis, welcome to quant.SE! Unfortunately I'm not really clear on what your asking. Can you please check that you use the definitions right? –  Bob Jansen Aug 16 '14 at 18:03
Are you distinguishing limit and market-orders? –  emcor Aug 16 '14 at 18:11
You will not be able to tell short orders from sell orders, and furthermore, it doesn't look like you have any trade data at all. All you have is orders to sell and orders to buy. The problem you are going to (eventually) have is you cannot determine whether a reduction of the size on one side of the order book is caused by a fill (someone selling via taking liquidity) or by someone cancelling their resting buy order (possibly in anticipation of buying via taking liquidity). –  experquisite Aug 16 '14 at 23:00
Most ask orders are way above asking price? Do you mean the bid-ask spread is wide? Additionally, are you also analyzing stock/ETF prices (ex. futures and forex)? If so for both cases, then I believe the "problem" lies in the market structure itself. –  Dorky May 14 at 17:25

## 1 Answer

Perhaps you might have to "match" Tick data to the best bid/offer to see which price(s) go through... If say the spread is 35.50/36.50 and the tick at that moment is 36.50 then we can consider this to be "buyer initiated" and of course if the tick is 35.50 then it becomes "seller initiated". That is to say if the price is above the average of the current spread we can consider it to "buyer initiated" and "seller initiated" if the price is below the average best bid/offer.

-