Colored Relative volume chart

shakib3585

Active member
VIP
Colored Relative volume chart based off buy/sell

I would request for a thinkscript that finds the relative volume for any "given" length at any "given" standard deviation. For that study, I would like to have green or, red colored bars on the relative volume chart based off buying and selling. If it’s a buying volume and crossed the "given" standard deviation for the given "length" of volume, then the bar should be light green. If it’s buying volume but did not cross the "given" standard deviation for the "given" length of volume then the color should be dark green. The opposite should go for the selling volume except, light red for crossing the standard deviation and dark red for not crossing the standard deviation. The study should be applicable at any given aggregation. Please help if possible.

Thank you
 
Last edited by a moderator:
Hello All,

I would request for a thinkscript that finds the relative volume for any "given" length at any "given" standard deviation. For that study, I would like to have green or, red colored bars on the relative volume chart based off buying and selling. If it’s a buying volume and crossed the "given" standard deviation for the given "length" of volume, then the bar should be light green. If it’s buying volume but did not cross the "given" standard deviation for the "given" length of volume then the color should be dark green. The opposite should go for the selling volume except, light red for crossing the standard deviation and dark red for not crossing the standard deviation. The study should be applicable at any given aggregation. Please help if possible.

Thank you

The ToS data feeds do not provide buying and selling volume.
You could plot your relative volume
and below it plot a buying and selling volume pressure indicator
https://usethinkscript.com/threads/...ssure-indicators-labels-for-thinkorswim.8466/

Volume pressure indicators make an assumption as to buyers and sellers.
Bullish candlestick patterns == buyers and Bearish == sellers.
 
Last edited:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

The ToS data feeds do not provide buying and selling volume.
You could plot your relative volume
and below it plot a buying and selling volume pressure indicator
https://usethinkscript.com/threads/...ssure-indicators-labels-for-thinkorswim.8466/

Volume pressure indicators make an assumption as to buyers and sellers.
Bullish candlestick patterns == buyers and Bearish == sellers.
Apologies for the confusion @MerryDay . What I would like is to use the same indicator "RelativeVolumeStDev (RVSD)" from tos except the colors should be as follows:

If the volume category is buying, then=> if the volume crosses the stdev then the bar color of the RVSD will be "light green" and if not then "dark green"

If the volume category is selling, then=> if the volume crosses the stdev then the bar color of the RVSD will be "light red" and if not then "dark red".

Thank you
 
solved
Code:
declare lower;
declare zerobase;

input length = 60;
input numDev = 2.0;
input allowNegativeValues = no;
def vol = volume;
def rawRelVol = (vol - Average(vol, length)) / StDev(vol, length);
plot RelVol = if allowNegativeValues then rawRelVol else Max(0, rawRelVol);
plot StDevLevel = numDev;


RelVol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
RelVol.SetLineWeight(3);
Relvol.AssignValueColor(if RelVol>=numdev and close>close[1] then color.green else if RelVol<numdev and close>close[1] then color.dark_green else if RelVol>=numdev and close<close[1] then color.red else color.dark_red);
StDevLevel.SetDefaultColor(GetColor(7));
StDevLevel.SetStyle(Curve.SHORT_DASH);
 
Last edited:
If the volume category is buying, then=> if the volume crosses the stdev then the bar color of the RVSD will be "light green" and if not then "dark green"

If the volume category is selling, then=> if the volume crosses the stdev then the bar color of the RVSD will be "light red" and if not then "dark red".
I understand what you are talking about, but it is important to remember that every single completed trade has 1 buyer and 1 seller for every single trade...
It may be interesting to consider how much volume occurs on the Bid or on the Ask in an area. There are several ways to use the data provided by the market.

It is late where I am but later this week I will provide some additional scripts for you to review and share your opinions and feedback on...
 
I understand what you are talking about, but it is important to remember that every single completed trade has 1 buyer and 1 seller for every single trade...
It may be interesting to consider how much volume occurs on the Bid or on the Ask in an area. There are several ways to use the data provided by the market.

It is late where I am but later this week I will provide some additional scripts for you to review and share your opinions and feedback on...
Thank you for your reply, @MatthewA . I also use relative volume, but I am more of a pivot trader. I like reference lines drawn before, as they are leading indicators. I would love to see your script and see how it works. I made a script myself and see how you feel about it
Code:
declare lower;
declare zerobase;

input length = 60;
input numDev = 2.0;
input allowNegativeValues = no;
def vol = volume;
def rawRelVol = (vol - Average(vol, length)) / StDev(vol, length);
plot RelVol = if allowNegativeValues then rawRelVol else Max(0, rawRelVol);
plot StDevLevel = numDev;


RelVol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
RelVol.SetLineWeight(3);
Relvol.AssignValueColor(if RelVol>=numdev and close>close[1] then color.green else if RelVol<numdev and close>close[1] then color.dark_green else if RelVol>=numdev and close<close[1] then color.red else color.dark_red);
StDevLevel.SetDefaultColor(GetColor(7));
StDevLevel.SetStyle(Curve.SHORT_DASH);
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
352 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top