# How to identify buy walls and sell walls from a limit orderbook?

I am trying to get notified of buy walls and sell walls from a limit orderbook and I had a couple of ideas and would appreciate some insight into these

1. Take the mean quantity and anything above the mean quantity would classify as a wall, problem would arise with extremely low price buys and high price sells
2. Take the median quantity, anything above median would do the same as 1
3. Divide the price range into 10% zones, compute the median in each zone and the largest quantity above the mean/median in the zones closest to the price would form a wall. This would trigger some fake walls though
4. Measure the largest quantities in descending order within a specified proximity from current highest bid and lowest ask and have a condition where if the bid quantity > sell quantity by a threshold T we get a buy wall and vice-versa for a sell wall. Are there better algorithms that I am not considering. This seems to be a problem similar to identifying candlestick chart patterns such as head and shoulder which needs threshold values to identify the formation

Are there any better mechanisms to identify buy and sell walls from an orderbook programatically? Some direction is appreciated

UPDATE 1 I could find nothing on IEEE xplore for orderbook https://ieeexplore.ieee.org/search/searchresult.jsp?newsearch=true&queryText=orderbook some direction/advice/snippet would be super appreciated

• A problem I see is that the definition of a "wall" seems highly subjective, and hard to pin down. And even an apparently solid wall can "melt away" quickly when the market approaches it. Nov 2, 2018 at 15:01

Estimate the distribution of the size of each queue $$Q_k$$ (in "average trade size") conditioned by the sizes of the queues at its left $$Q_{k-1}$$ and at its right $$Q_{k+1}$$. Now you can
1. observe the sizes of $$Q_{k-1}$$ and $$Q_{k+1}$$
2. get the historical distribution $$d\mu(Q_k|Q_{k-1},Q_{k+1})$$ given these two values
3. take a quantile or get the empirical probability to observe the effective $$Q_k$$