#### scriptorswim

##### New member
I'm trying to find a simple indicator that plots a line much like an oscillator that indicates Bid Volume - Ask Volume to be used on intraday trading. It seems a pretty simple thing to create but I can't find anything and am totally incapable of coding that. It would act similar to Bookmap, if you know what that is. Thanks for any help.

Last edited:
Solution
@scriptorswim

Code:
``````# Hui Heubel Liquidty Ratio

# Mobius

# Chat Room Request 05.26.2015

declare lower;

input n = 5;

def v = if isNaN(volume) then v else volume;

def Pmax = highest(high, n);

def Pmin = lowest(low, n);

def sV = sum(v, n);

def AvgV = hullMovingAvg(v, n);

plot H_H = ((Pmax - Pmin) / Pmin) / (v / (sV * AvgV));

H_H.SetPaintingStrategy(PaintingStrategy.Histogram);

h_h.assignvaluecolor(if h_h > h_h then color.green else if h_h < h_h then color.red else color.white);

plot a = hullMovingAvg(h_h,13);``````

##### Active member
How would you chart this? Bid/Ask sizes a rather dynamic piece of info, as the are changing by the second, relevant information goes by pretty fast. 2 things I could think of how to use that info in a different format would be: a largest bid/ask size indicator maybe, something that will show you largest order filled for the day, then color coded to show either on Bid or Ask, and have that as a small data set in top left corner of chart???...... OR..... Create and utilize a tool like the Bull vs. Bear example I have here https://www.mql5.com/en/code/7053 , where it is a histogram and the positive and negative bars are generated as a battle by Bid/Ask spread, so for each candle the Bids generated higher total sizes, green bar up, Ask generates higher total sizes, red bar going down... Now in theory that would be a cool indicator so if someone knows how to access the Bid/Ask data for this, lets test it, but that is something out of my purview. Honestly though, you are probably better off just watch T&S and the Dom, but here are some ideas that immediately jumped out at me to get the ball rolling

#### codydog

##### Active member
@scriptorswim

Code:
``````# Hui Heubel Liquidty Ratio

# Mobius

# Chat Room Request 05.26.2015

declare lower;

input n = 5;

def v = if isNaN(volume) then v else volume;

def Pmax = highest(high, n);

def Pmin = lowest(low, n);

def sV = sum(v, n);

def AvgV = hullMovingAvg(v, n);

plot H_H = ((Pmax - Pmin) / Pmin) / (v / (sV * AvgV));

H_H.SetPaintingStrategy(PaintingStrategy.Histogram);

h_h.assignvaluecolor(if h_h > h_h then color.green else if h_h < h_h then color.red else color.white);

plot a = hullMovingAvg(h_h,13);``````

#### codydog

##### Active member
@Artie - I dont think tos allows bid-ask size volumes to be pulled. If you find out otherwise, please let me know
Thanks!

#### Artie

##### New member
thanks @codydog. That's unfortunate because it's an important factor in day trading. The icebergs are sitting there and it would be very helpful to be able to identify them to determine if a move up or down is being supported by volume. Volume itself is too slow to help on smaller time frames.

#### codydog

##### Active member
@Artie - i agree with you, it would be a great charting addition.

#### Ates

##### New member
Hi everyone,

Is it possible to reach total bids and asks?

Say ROKU is trading at 330.87 and there are 2500 limit buy orders at 330.85 and 1500 limit sell orders at 330.88

Is this possible with thinkscript?

• 