ThinkorSwim Bid/Ask Size Indicator

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[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);

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
 

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[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);
 
Solution

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.
 

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:

Tony Stark

New member
hey everyone, I'm overheating my head trying to find a way to at least bare minimum be able to Gather the Bid/ASK from Depth of Market DOM Level 2, so one can put it into an array and save it.

Any help would be greatly appreciated, Ty!
 

Jorge_Ocampo

New member
Someone knows a script that marks in the chart when an absorption is generated in BID or ASK. Would be cool to have an indicator for TOS that detects the absorption of the bid/ask sizes.

JXHFQk2.png
 
Last edited by a moderator:

DB01

New member
VIP
I would like to be able to see the total of the numbers in the bid size column and the total of the numbers in the ask size in either the level 2 tab or the active trader tab on the TOS platform that changes dynamically as the columns change. Long/short I want to know if there are more pending buy orders or more pending sell orders in real time. Anyone know how I can do that?
 

DPop

New member
Anyone have issues using Bid() or Ask() calls when creating custom quotes? If I try a simple script to just get the spread (Ask()-Bid()) on a 1 Day timeframe I keep getting NaN as the result. Any help getting over this would be appreciated.
 

Montana101x

New member
Hi guys, I am learning to day trade equity US stock particularly the large cap such as ZM, TSLA or BYND etc.. Notice on TOS on the Trading Active through the scrolled bar you can’t enter on the limit order or bid due to the volatility is High so that cost the stock spread between Bid and the Ask as we look on level two is wider that means we sometimes take wrong position not Calculating our position size how much we are risking. I recently saw a dude on YouTube and he has custom Spread on his watch list bar so he could easily know each stocks spread bid and the ask. I would appreciate anyone that make a script this or share their code. Thank you

I have the screenshot of the example but can’t share the images here eh... I hope admin add the upload file image here
 

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?
 

rad14733

Well-known member
VIP
@Ates Bid and Ask are merely current Bid and Ask values which have no real correlation to actual trade prices... They change far more frequently than actual trades take place... I fail to see the merit in plotting them aside from seeing Bid/Ask spread... Aside from that, that's what Level II and Level III are for in the Active Trader Panel... They are real-time in Active Trader and in Watchlists, but would be 3 - 5 minutes delayed in a Watchlist if plotted using a Custom Column calculation...
 

Similar threads

Top