Possible to create an indicator based on bid/ask sizes?

T

tradebyday

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
 
C

codydog

Active member
The title really. I can see price related codes like bid and ask but they refer to the price not the size (from level 2). Is it possible to create an indicator based on bid/ask sizes or do i have to go into API route?
I wonder if Hui Heubul is what you're looking for? If so let me know
 
S

scriptorswim

New member
@codydog, i didnt know what it was and read the imf definition but im now def. interested in that.
 
C

codydog

Active member
@codydog, i didnt know what it was and read the imf definition but im now def. interested in that.
# Hui Heubel Liquidty Ratio
# Mobius
# Chat Room Request 05.26.2015

declare lower;

input n = 5;

def v = if isNaN(volume) then v[1] 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[1] then color.green else if h_h < h_h[1] then color.red else color.white);

plot a = hullMovingAvg(h_h,13);
 
A

Artie

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.
 
C

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!
 
A

Artie

New member
@Artie - I dont think tos allows bid-ask size volumes to be pulled. If you find out otherwise, please let me know
Thanks!
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.
 
C

codydog

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

Artie

New member
I believe Ninja Trader has such an indicator, one called Ask/Bid Volume Difference Bars and one called Bid Ask Volume Ratio. I'd like to see something like that in TOS, not sure why TOS doesn't allow Bid Ask Volume. Most other platforms have that. In addition to TOS, I use a software called Ensign Software. They have an indicator called Cumulative Volume which measures Bid Volume - Ask Volume. I'm trying to program that for Ensign, but I'm a terrible coder.
 
Last edited:

Similar threads

Top