1 Minute Volume Bar Alert

vancount77

New member
I am trying to create an alert that shows when the current volume bar exceeds the volume of the previous bar on a one minute chart. My diminishing eyesight makes it very hard to see the volume txt in the volume subgraph in ToS. And I find that unless there is a large volume difference between bars, it is often difficult for me to discern differences bwtween bars on just visual information. Thank you very much.
 
Solution
I am trying to create an alert that shows when the current volume bar exceeds the volume of the previous bar on a one minute chart. My diminishing eyesight makes it very hard to see the volume txt in the volume subgraph in ToS. And I find that unless there is a large volume difference between bars, it is often difficult for me to discern differences bwtween bars on just visual information. Thank you very much.

This code is placed in the volume pane. It has a bubble and/or audio/visual alert. The bubble or alert when turned on will activate only when the volume of the current bar is greater than the prior bar. The bubble can be moved sideways by the bars input at the bubblemover.

Capture.jpg

Ruby:
input...
I am trying to create an alert that shows when the current volume bar exceeds the volume of the previous bar on a one minute chart. My diminishing eyesight makes it very hard to see the volume txt in the volume subgraph in ToS. And I find that unless there is a large volume difference between bars, it is often difficult for me to discern differences bwtween bars on just visual information. Thank you very much.

This code is placed in the volume pane. It has a bubble and/or audio/visual alert. The bubble or alert when turned on will activate only when the volume of the current bar is greater than the prior bar. The bubble can be moved sideways by the bars input at the bubblemover.


Ruby:
input showbubble_volume_bar = yes;
input bubblemover_volume_bar = 3;
def   m = bubblemover_volume_bar;
def   m1 = m + 1;
AddChartBubble(showbubble_volume_bar and IsNaN(volume[m]) and !IsNaN(volume[m1]) and volume[m1] > volume[m1 + 1], 0, volume[m1] - volume[m1 + 1] + "\n" + AsPercent((volume[m1] - volume[m1 + 1]) / volume[m1 + 1]),  Color.RED);

input alert_on = no;
Alert(alert_on and volume > volume[1], "High Volume", Alert.BAR, Sound.Bell);

This code is placed in the upper price pane and then bubble will appear again only appear when activated as the volume of the current bar is greater than the prior bar. Again the bubble can be moved sideways

Ruby:
input showbubble_price_bar  = yes;
input bubblemover_price_bar = 3;
def   m= bubblemover_price_bar;
def   m1=m+1;
AddChartBubble(showbubble_price_bar and IsNaN(close[m]) and !isnan(close[m1]) and volume[m1] > volume[m1+1], close[m1], volume[m1] - volume[m1+1] + "\n" + aspercent((volume[m1]-volume[m1+1])/volume[m1+1]),  Color.red);
.
 
Solution
This code is placed in the volume pane. It has a bubble and/or audio/visual alert. The bubble or alert when turned on will activate only when the volume of the current bar is greater than the prior bar. The bubble can be moved sideways by the bars input at the bubblemover.





This code is placed in the upper price pane and then bubble will appear again only appear when activated as the volume of the current bar is greater than the prior bar. Again the bubble can be moved sideways
Thank you so much for writing this. I am very grateful for you and this community. I have been using it this week and it works very well. The only addtional quation I have is - Is there anyway that the volume bars that are larger than the previos bars can stay flagged or marked? All record of previous bars disappears with the priniting of a new bar. So it is still very hard for me to see the bars on any kind if historical basis. Thank you so much!
 
Thank you so much for writing this. I am very grateful for you and this community. I have been using it this week and it works very well. The only addtional quation I have is - Is there anyway that the volume bars that are larger than the previos bars can stay flagged or marked? All record of previous bars disappears with the priniting of a new bar. So it is still very hard for me to see the bars on any kind if historical basis. Thank you so much!

You're welcome! See if this helps for your historical look:

Ruby:
input showbubble_volume_bar = yes;
AddChartBubble(showbubble_volume_bar and volume > volume[1], volume, volume - volume[1] + "\n" + AsPercent((volume - volume[1]) / volume[1]),  Color.RED);
 
Hi,

I have modified the VolumeAvg script to customize the volume bar color below is my code. I don't see any error in the code.
After applying the modification I dont see the volume bars in the volume panel. Any input on this?

Thanks in advance
Umasankar
=============
declare lower;
declare zerobase;

input length = 50;

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

Vol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Vol.SetLineWeight(3);
Vol.AssignValueColor(if close > close[1] and Vol < 50000 then Vol.color("UPTICK") else if close > close[1] and Vol >= 50000 then Vol.color("DARK_GREEN") else if close < close[1] and Vol < 50000 then Vol.color("DOWNTICK") else if close < close[1] and Vol >= 50000 then Vol.color("DARL_RED") else GetColor(1));
VolAvg.SetDefaultColor(GetColor(8));
==============
 
Hi,

I have modified the VolumeAvg script to customize the volume bar color below is my code. I don't see any error in the code.
After applying the modification I dont see the volume bars in the volume panel. Any input on this?

Thanks in advance
Umasankar
=============
declare lower;
declare zerobase;

input length = 50;

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

Vol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Vol.SetLineWeight(3);
Vol.AssignValueColor(if close > close[1] and Vol < 50000 then Vol.color("UPTICK") else if close > close[1] and Vol >= 50000 then Vol.color("DARK_GREEN") else if close < close[1] and Vol < 50000 then Vol.color("DOWNTICK") else if close < close[1] and Vol >= 50000 then Vol.color("DARL_RED") else GetColor(1));
VolAvg.SetDefaultColor(GetColor(8));
==============

Your Vol.color() code needed to be defined to use it the way you are coding. See definecolor in the manual for examples.

The following modification to your code works without the need for the definecolor optional method.

Ruby:
declare lower;
declare zerobase;

input length = 50;

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

Vol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Vol.SetLineWeight(3);
Vol.definecolor("DARK_RED", color.darK_RED);
Vol.AssignValueColor(if close > close[1] and Vol < 50000 then color.UPTICK else if close > close[1] and Vol >= 50000 then color.DARK_GREEN else if close < close[1] and Vol < 50000 then color.DOWNTICK else if close < close[1] and Vol >= 50000 then color.DARK_RED else GetColor(1));
VolAvg.SetDefaultColor(GetColor(8));
 

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
455 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