Buy and Sell Volume and Percentages for Indexes, Options, and stocks

Bugs_Munny

New member
I am looking for a script that show volume on the buy and sell side as well as percentages. Can anyone point me in the right direction?

unknown.png
 

perseverance_trading1

New member
VIP
I am looking for a script that show volume on the buy and sell side as well as percentages. Can anyone point me in the right direction?

unknown.png
@Bugs_Munny ,

Did you ever a response or have you made any progress on finding this? I've seen the same thing on eTrade but do not have the code for either. Keep me posted.

@zeek

Code:
declare lower;

#Inputs

input ShowSellVolumePercent = yes;

def O = open;
def H = high;
def C = close;
def L = low;
def V = volume;
def buying = V*(C-L)/(H-L);
def selling = V*(H-C)/(H-L);

#Volume Data


def today = volume(period = "DAY");

def curVolume = volume;

def SellVolPercent = Round((Selling / Volume) * 100, 0);

# Labels

AddLabel(ShowSellVolumePercent, "Cur Bar Sell %: " + SellVolPercent, (if SellVolPercent > 51 then Color.RED else if SellVolPercent < 49 then Color.GREEN else Color.ORANGE));

@horserider

What a great snippet of code.
Thank you for sharing, very grateful.

This will help a lot when combined with Fib Extensions and Elliott Wave.

Cheers!
 
Last edited:

Nomak

Member
2019 Donor
I am looking for a script that show volume on the buy and sell side as well as percentages. Can anyone point me in the right direction?

unknown.png

@Bugs_Munny ,

Did you ever a response or have you made any progress on finding this? I've seen the same thing on eTrade but do not have the code for either. Keep me posted.



@horserider

What a great snippet of code.
Thank you for sharing, very grateful.

This will help a lot when combined with Fib Extensions and Elliott Wave.

Cheers!

Hi Bugs_Munny, have you gotten the code for this? If so, can you please share?

Last week I look into basic Thinkscript coding I was able to follow the pattern from Horserider. This version does the aggregation by day or smaller time frame. For example, a 5 mins bar then resets to the next 5 mins. I would run two of these studies together one by day and the other by the time frame you trade on.

Code:
# Show SELL and BUY Volume and percentage.
# Referencing credit to Horserider script at https://usethinkscript.com/threads/volume-buy-sell-indicator-with-hot-percent-for-thinkorswim.389/
# Nomak 02/21/2020

declare lower; 
input timeframe = AggregationPeriod.DAY;


def Vol = volume(period = timeframe);
def at_High = high(period = timeframe);
def at_Open = open(period = timeframe);
def at_Close = close(period = timeframe);
def at_Low = low(period = timeframe);
def Vol1 = volume(period = timeframe);
def at_High1 = high(period = timeframe);
def at_Open1 = open(period = timeframe);
def at_Close1 = close(period = timeframe);
def at_Low1 = low(period = timeframe);

# Buy_Volume forumla is volume * (close_price minus low_price) / (High_price minus low_price)
def Buy_Volume = roundup(Vol * (at_close - at_low) / (at_High - at_Low));
def Buy_percent = roundup((Buy_volume / Vol) * 100);

#Sell_Volume forumla is  volume * (High_price minus Close_price) / (High_price minus Low_price)
def Sell_Volume = rounddown(Vol1 * (at_High1 - at_Close1) / (at_High1 - at_low1));
def Sell_percent = roundup((Sell_Volume / Vol1) * 100);

Addlabel(yes, "BuyVol " + Buy_Volume, Color.Green);
Addlabel(yes, "SellVol " + Sell_Volume, Color.Red);
AddLabel(yes, "Buy % " + Buy_percent, Color.Green);
Addlabel(yes, "Sell % " + Sell_percent, Color.Red);
 

Options Manor

New member
Hello, I am looking for help to replicate this image of Buy and sell volume along with percentages.
This can be used on equites, options prices, and indexes.
You can ignore the support lines that are on the chart, they are separate and unrelated
I am unfortunately not a coder.
This could be very useful for entering and exiting trades.
0LiS4IQ.png

The picture of the screenshot should be helpful

Thanks!
 

Similar threads

Top