• Get $40 off VIP by signing up for a free account! Sign Up

Lowest volume level

CharlieK

New member
I use one time frame chart at a time, and under that, I have the VolumeAvg chart (histogram?), with the 50 period average. On the VolumeAvg chart (graph?) I would like to automatically put in a volume level at the lowest volume bar, in the previous 6 months, not counting the current day. The chart is 6 month: 1 Day.

I use the Monthly, Weekly, and Daily charts. It would be nice if it worked on both the Weekly and Daily, but the Daily is the important one.

I do this manually, using the Price Level tool, by clicking near the top of the lowest volume bar, and then right clicking that level to edit the volume to get it exact. I'm assuming that I can add some script to the script of the VolumeAvg to do this?

Or if there is already a post for it, point me to it?

Thanks!
 
Solution
Re-phrasing what I'm looking for, and removing some noise from my initial question... I'm looking for, on the daily chart, in the VolumeAvg(50) chart window, to automatically draw a line at the lowest green volume bar, and from that bar to the right side of the chart. Starting at the lowest green bar, makes easy to see where that bar is in relation to the chart, at a quick glance. Making it Orange, distinguishes it from any other price levels (volume levels) that I may put in from time to time.

The attached picture is an example of what I am looking for, and currently do. The Orange solid price level line, is the highest green volume bar, since July 1, 2021. How far back it looks, needs to be adjustable, but just changing it...
Re-phrasing what I'm looking for, and removing some noise from my initial question... I'm looking for, on the daily chart, in the VolumeAvg(50) chart window, to automatically draw a line at the lowest green volume bar, and from that bar to the right side of the chart. Starting at the lowest green bar, makes easy to see where that bar is in relation to the chart, at a quick glance. Making it Orange, distinguishes it from any other price levels (volume levels) that I may put in from time to time.

The attached picture is an example of what I am looking for, and currently do. The Orange solid price level line, is the highest green volume bar, since July 1, 2021. How far back it looks, needs to be adjustable, but just changing it in the code is fine. I currently go through the last full quarter... to the current date. I may at some time, wish to look further... Or not as far.

It would be nice if this could be a script, inside of the VolumemAvg(50) windows script, but I'm getting stumped at how to actually do it.

Thanks!

Lowest-Volume.jpg
 
Re-phrasing what I'm looking for, and removing some noise from my initial question... I'm looking for, on the daily chart, in the VolumeAvg(50) chart window, to automatically draw a line at the lowest green volume bar, and from that bar to the right side of the chart. Starting at the lowest green bar, makes easy to see where that bar is in relation to the chart, at a quick glance. Making it Orange, distinguishes it from any other price levels (volume levels) that I may put in from time to time.

The attached picture is an example of what I am looking for, and currently do. The Orange solid price level line, is the highest green volume bar, since July 1, 2021. How far back it looks, needs to be adjustable, but just changing it in the code is fine. I currently go through the last full quarter... to the current date. I may at some time, wish to look further... Or not as far.

It would be nice if this could be a script, inside of the VolumemAvg(50) windows script, but I'm getting stumped at how to actually do it.

Thanks!

Lowest-Volume.jpg

Based upon your image, it appears that you use candle trend candles to determine green candles, so that is what is used in the code below. Input the number of months you want to lookback for the lowest green volume bar's volume. There are options to display a label and/or chartbubble.

Capture.jpg
Ruby:
input months = 5;

def vol      = if close >= close[1] then volume else vol[1];

def lookback = if GetYear() == GetLastYear() and GetMonth() > GetLastMonth() - months and vol
               then 1 else 0;

def lowgreen = if lookback[1] != 1 and lookback == 1
               then vol
               else if lookback == 1 and vol
               then Min(vol, lowgreen[1])
               else lowgreen[1];

def lowestgreen  = highestall(if isnan(volume[-1]) and !isnan(volume)
                              then lowgreen
                              else double.nan) ;

plot lowestgreenvolume = lowestgreen;
lowestgreenvolume.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

input showbubble = yes;
AddChartBubble(showbubble and volume==lowestgreen, volume, lowgreen, Color.WHITE);

input showlabel  = yes;
addlabel(showlabel, "Lowest Green Volume in Last " + months + " months = " + lowestgreen, color.white);
 
Last edited:
Solution
Because I still want the Average volume as well, the attached picture is how I put it in... I still want the ability to manually put levels into the volume area, but this has removed the ability to add anything else. Do you know why?

Last-Low-Green.jpg
 
Last edited by a moderator:
Because I still want the Average volume as well, the attached picture is how I put it in... I still want the ability to manually put levels into the volume area, but this has removed the ability to add anything else. Do you know why?

Last-Low-Green.jpg
Once you put 2 or more seperate indicators into a lower cell, TOS will use a percentage/normalization process to fit these into the lower panel.

However, in this instance the volumeaverage indicator will plot without having to normalize it in the script that I gave you. You can then use the drawing tool as you want. See the code and image below where there is a volumeavg plot and a trendline drawn.

Capture.jpg
Ruby:
input months = 5;

def vol      = if close >= close[1] then volume else vol[1];

def lookback = if GetYear() == GetLastYear() and GetMonth() > GetLastMonth() - months and vol
               then 1 else 0;

def lowgreen = if lookback[1] != 1 and lookback == 1
               then vol
               else if lookback == 1 and vol
               then Min(vol, lowgreen[1])
               else lowgreen[1];

def lowestgreen  = highestall(if isnan(volume[-1]) and !isnan(volume)
                              then lowgreen
                              else double.nan) ;

plot lowestgreenvolume = lowestgreen;
lowestgreenvolume.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);

plot volavg = VolumeAvg().VolAvg;

input showbubble = yes;
AddChartBubble(showbubble and volume==lowestgreen, volume, lowgreen, Color.WHITE);

input showlabel  = yes;
addlabel(showlabel, "Lowest Green Volume in Last " + months + " months = " + lowestgreen, color.white);
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
369 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