Average Volume

Whizz

New member
Hello, does anyone have a script that shows labels with the average volume for 5 min, 15min, 30min, 1hour, 90min, and 2hour? As well as labels with the current volume for those timeframes that change colors if it's over or under the avg volume.

Thanks,
 
Solution
Hey Whizz. I **** at programming and coding but here is something I messed with for you. It only works on the 5 min timeframe currently. The dotted lines are the avg volume of the past periods you choose. The bars are the 5 min timeframe volume. There is a (period) avg volume, 5min, 15min, 30min, and 1 hour labels. If the dotted (period) avg volume is greater than the 5 min time period volumes the label will Turn Green and the 5 min label will say No, and show the current volume if the 5 min volume is higher than the (period) avg volume it will say YES and show the current volume. The 15 min, 30 min, and 1 hour labels will turn green if the volume on those time periods are relatively higher than the (period) avg volume and say YES +...
Hey Whizz. I **** at programming and coding but here is something I messed with for you. It only works on the 5 min timeframe currently. The dotted lines are the avg volume of the past periods you choose. The bars are the 5 min timeframe volume. There is a (period) avg volume, 5min, 15min, 30min, and 1 hour labels. If the dotted (period) avg volume is greater than the 5 min time period volumes the label will Turn Green and the 5 min label will say No, and show the current volume if the 5 min volume is higher than the (period) avg volume it will say YES and show the current volume. The 15 min, 30 min, and 1 hour labels will turn green if the volume on those time periods are relatively higher than the (period) avg volume and say YES + current volume. I’ll get it better in the coming days. So sleepy lol. Good luck trading. Feel free to reach out.

80-A34-BCC-C79-F-403-C-83-FD-12-D6-FAFFE6-D1.jpg

Rich (BB code):
declare lower;
declare zerobase;

def voll = volume(GetSymbol(), (aggregationPeriod.FIVE_MIN)) ;
def min15 = volume(GetSymbol(),(aggregationPeriod.FIFTEEN_MIN)) ;
def min30 = volume(GetSymbol(),(aggregationPeriod.THIRTY_MIN)) ;
def min60 = volume(GetSymbol(),(aggregationPeriod.HOUR)) ;
input length = 10 ;


plot Vol = volume;
plot VolAvg = Average(volume, length) ;

Addlabel( yes, if volavg > voll then LENGTH + " PERIOD AVG VOL: " + Volavg     else LENGTH + " PERIOD AVG VOL: " + volavg     , if volavg < voll then color.red else color.green) ;
Addlabel( yes, if volavg > voll then "NO, 5 MIN VOL: " + voll     else "YES, 5 MIN VOL: " + voll      , if volavg > voll then color.red else color.green) ;
Addlabel( yes, if volavg*3 >min15 then "NO, 15 MIN VOL: " + min15     else "YES, 15 MIN VOL: " + min15     , if volavg*3 > min15 then color.red else color.green) ;
Addlabel( yes, if volavg*6 >min30 then "NO, 30 MIN VOL: " + min30    else "YES, 30 MIN VOL: " + min30    , if volavg*6 > min30 then color.red else color.green) ;
Addlabel( yes, if volavg*12 >min60 then "NO, 1 HOUR VOL: " + min60    else "YES, 1 HOUR VOL: " + min60    , if volavg*12 > min60 then color.red else color.green) ;




Vol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Vol.SetLineWeight(3);
Vol.DefineColor("Up", Color.UPTICK);
Vol.DefineColor("Down", Color.DOWNTICK);
Vol.AssignValueColor(if close > close[1] then Vol.color("Up") else if close < close[1] then Vol.color("Down") else GetColor(1));
VolAvg.SetDefaultColor(GetColor(8));
 
Solution

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

Hey Whizz. I **** at programming and coding but here is something I messed with for you. It only works on the 5 min timeframe currently. The dotted lines are the avg volume of the past periods you choose. The bars are the 5 min timeframe volume. There is a (period) avg volume, 5min, 15min, 30min, and 1 hour labels. If the dotted (period) avg volume is greater than the 5 min time period volumes the label will Turn Green and the 5 min label will say No, and show the current volume if the 5 min volume is higher than the (period) avg volume it will say YES and show the current volume. The 15 min, 30 min, and 1 hour labels will turn green if the volume on those time periods are relatively higher than the (period) avg volume and say YES + current volume. I’ll get it better in the coming days. So sleepy lol. Good luck trading. Feel free to reach out.

80-A34-BCC-C79-F-403-C-83-FD-12-D6-FAFFE6-D1.jpg

Rich (BB code):
declare lower;
declare zerobase;

def voll = volume(GetSymbol(), (aggregationPeriod.FIVE_MIN)) ;
def min15 = volume(GetSymbol(),(aggregationPeriod.FIFTEEN_MIN)) ;
def min30 = volume(GetSymbol(),(aggregationPeriod.THIRTY_MIN)) ;
def min60 = volume(GetSymbol(),(aggregationPeriod.HOUR)) ;
input length = 10 ;


plot Vol = volume;
plot VolAvg = Average(volume, length) ;

Addlabel( yes, if volavg > voll then LENGTH + " PERIOD AVG VOL: " + Volavg     else LENGTH + " PERIOD AVG VOL: " + volavg     , if volavg < voll then color.red else color.green) ;
Addlabel( yes, if volavg > voll then "NO, 5 MIN VOL: " + voll     else "YES, 5 MIN VOL: " + voll      , if volavg > voll then color.red else color.green) ;
Addlabel( yes, if volavg*3 >min15 then "NO, 15 MIN VOL: " + min15     else "YES, 15 MIN VOL: " + min15     , if volavg*3 > min15 then color.red else color.green) ;
Addlabel( yes, if volavg*6 >min30 then "NO, 30 MIN VOL: " + min30    else "YES, 30 MIN VOL: " + min30    , if volavg*6 > min30 then color.red else color.green) ;
Addlabel( yes, if volavg*12 >min60 then "NO, 1 HOUR VOL: " + min60    else "YES, 1 HOUR VOL: " + min60    , if volavg*12 > min60 then color.red else color.green) ;




Vol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Vol.SetLineWeight(3);
Vol.DefineColor("Up", Color.UPTICK);
Vol.DefineColor("Down", Color.DOWNTICK);
Vol.AssignValueColor(if close > close[1] then Vol.color("Up") else if close < close[1] then Vol.color("Down") else GetColor(1));
VolAvg.SetDefaultColor(GetColor(8));
This looks interesting. You mentioned it only worked on the 5m timeframe. what do I need to do to make it work on the 3m chart? or better still work on all timeframes?
 
Hey Whizz. I **** at programming and coding but here is something I messed with for you. It only works on the 5 min timeframe currently. The dotted lines are the avg volume of the past periods you choose. The bars are the 5 min timeframe volume. There is a (period) avg volume, 5min, 15min, 30min, and 1 hour labels. If the dotted (period) avg volume is greater than the 5 min time period volumes the label will Turn Green and the 5 min label will say No, and show the current volume if the 5 min volume is higher than the (period) avg volume it will say YES and show the current volume. The 15 min, 30 min, and 1 hour labels will turn green if the volume on those time periods are relatively higher than the (period) avg volume and say YES + current volume. I’ll get it better in the coming days. So sleepy lol. Good luck trading. Feel free to reach out.

80-A34-BCC-C79-F-403-C-83-FD-12-D6-FAFFE6-D1.jpg

Rich (BB code):
declare lower;
declare zerobase;

def voll = volume(GetSymbol(), (aggregationPeriod.FIVE_MIN)) ;
def min15 = volume(GetSymbol(),(aggregationPeriod.FIFTEEN_MIN)) ;
def min30 = volume(GetSymbol(),(aggregationPeriod.THIRTY_MIN)) ;
def min60 = volume(GetSymbol(),(aggregationPeriod.HOUR)) ;
input length = 10 ;


plot Vol = volume;
plot VolAvg = Average(volume, length) ;

Addlabel( yes, if volavg > voll then LENGTH + " PERIOD AVG VOL: " + Volavg     else LENGTH + " PERIOD AVG VOL: " + volavg     , if volavg < voll then color.red else color.green) ;
Addlabel( yes, if volavg > voll then "NO, 5 MIN VOL: " + voll     else "YES, 5 MIN VOL: " + voll      , if volavg > voll then color.red else color.green) ;
Addlabel( yes, if volavg*3 >min15 then "NO, 15 MIN VOL: " + min15     else "YES, 15 MIN VOL: " + min15     , if volavg*3 > min15 then color.red else color.green) ;
Addlabel( yes, if volavg*6 >min30 then "NO, 30 MIN VOL: " + min30    else "YES, 30 MIN VOL: " + min30    , if volavg*6 > min30 then color.red else color.green) ;
Addlabel( yes, if volavg*12 >min60 then "NO, 1 HOUR VOL: " + min60    else "YES, 1 HOUR VOL: " + min60    , if volavg*12 > min60 then color.red else color.green) ;




Vol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Vol.SetLineWeight(3);
Vol.DefineColor("Up", Color.UPTICK);
Vol.DefineColor("Down", Color.DOWNTICK);
Vol.AssignValueColor(if close > close[1] then Vol.color("Up") else if close < close[1] then Vol.color("Down") else GetColor(1));
VolAvg.SetDefaultColor(GetColor(8));
Hey thanks for taking the time to do this, any chance you got it to work on all TF?
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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