My Mixed Volume Indicator needs signals, any ideas?

azakusa

Member
Lately I have been using a mixed volume visual indicator with some success.

I got it somewhere here on usethinkscript, and really helps provide that subtle additional confirmation to real-time setups as they are playing out.

The issue is that its quite hard to see vol candles and PA at the same time, without zooming in quite deeply, and its got me thinking that an additional visual signal would be amazing.

Is there a way to code it so that an arrow or a dot or some visual indication appears in the volume panel over any vol candle that is all red or all green (or nearly so)? This way I could see it at a glance when playing the 1m on fast movers.

Here is the code I have been using for the visual.
Note I added the avg vol line and label myself, but I am in no way a coder, so it may not be perfect.
That said, I think its working fine and have been using it to help confirm entries for some time now.

---------------------------
#Mixed_Vol_Avg_Label

declare lower;
declare zerobase;

input length = 50;

plot VolAvg = Average(volume, length);

VolAvg.SetDefaultColor(GetColor(8));

#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);

# Selling Volume
Plot SV = selling;
SV.setPaintingStrategy(PaintingStrategy.Histogram);
SV.SetDefaultColor(Color.Red);
SV.HideTitle();
SV.HideBubble();
SV.SetLineWeight(5);

# Buying Volume
# Plot BV = Buying;
# Note that Selling + Buying Volume = Volume.
Plot BV = volume;
BV.setPaintingStrategy(PaintingStrategy.Histogram);
BV.SetDefaultColor(Color.Dark_Green);
BV.HideTitle();
BV.HideBubble();
BV.SetLineWeight(5);

# Labels
AddLabel(ShowSellVolumePercent, "Cur Bar Sell %: " + SellVolPercent, (if SellVolPercent > 51 then Color.RED else if SellVolPercent < 49 then Color.GREEN else Color.ORANGE));
 
Last edited:
Lately I have been using a mixed volume visual indicator with some success.

I got it somewhere here on usethinkscript, and really helps provide that subtle additional confirmation to real-time setups as they are playing out.

The issue is that its quite hard to see vol candles and PA at the same time, without zooming in quite deeply, and its got me thinking that an additional visual signal would be amazing.

Is there a way to code it so that an arrow or a dot or some visual indication appears in the volume panel over any vol candle that is all red or all green (or nearly so)? This way I could see it at a glance when playing the 1m on fast movers.

Here is the code I have been using for the visual.
Note I added the avg vol line and label myself, but I am in no way a coder, so it may not be perfect.
That said, I think its working fine and have been using it to help confirm entries for some time now.

---------------------------
#Mixed_Vol_Avg_Label

declare lower;
declare zerobase;

input length = 50;

plot VolAvg = Average(volume, length);

VolAvg.SetDefaultColor(GetColor(8));

#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);

# Selling Volume
Plot SV = selling;
SV.setPaintingStrategy(PaintingStrategy.Histogram);
SV.SetDefaultColor(Color.Red);
SV.HideTitle();
SV.HideBubble();
SV.SetLineWeight(5);

# Buying Volume
# Plot BV = Buying;
# Note that Selling + Buying Volume = Volume.
Plot BV = volume;
BV.setPaintingStrategy(PaintingStrategy.Histogram);
BV.SetDefaultColor(Color.Dark_Green);
BV.HideTitle();
BV.HideBubble();
BV.SetLineWeight(5);

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

something like this?
it draws dots above a volume bar when buy or sell % is > 90%

Code:
#vol_mixed

#https://usethinkscript.com/threads/my-mixed-volume-indicator-needs-signals-any-ideas.18830/
#My Mixed Volume Indicator needs signals, any ideas?

declare lower;
declare zerobase;

def na = double.nan;

input length = 50;
plot VolAvg = Average(volume, length);
VolAvg.SetDefaultColor(GetColor(8));

#Inputs
input ShowSellVolumePercent = yes;
input ShowbuyVolumePercent = 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);
def buyVolPercent = Round((buying / Volume) * 100, 0);

# Selling Volume
Plot SV = selling;
SV.setPaintingStrategy(PaintingStrategy.Histogram);
SV.SetDefaultColor(Color.Red);
SV.HideTitle();
SV.HideBubble();
SV.SetLineWeight(5);

# Buying Volume
# Plot BV = Buying;
# Note that Selling + Buying Volume = Volume.
Plot BV = volume;
BV.setPaintingStrategy(PaintingStrategy.Histogram);
BV.SetDefaultColor(Color.Dark_Green);
BV.HideTitle();
BV.HideBubble();
BV.SetLineWeight(5);

# Labels
AddLabel(ShowSellVolumePercent, "Cur Bar Sell %: " + SellVolPercent, (if SellVolPercent > 51 then Color.RED else if SellVolPercent < 49 then Color.GREEN else Color.ORANGE));
AddLabel(ShowbuyVolumePercent, "Cur Bar Buy %: " + buyVolPercent, (if buyVolPercent > 51 then Color.green else if buyVolPercent < 49 then Color.red else Color.ORANGE));

input tolerance_per = 10.0;
plot zdot = if SellVolPercent <= tolerance_per or buyVolPercent <= tolerance_per then volume*1.1 else na;
zdot.SetPaintingStrategy(PaintingStrategy.POINTS);
zdot.AssignValueColor(
 if SellVolPercent <= tolerance_per then color.green
 else if buyVolPercent <= tolerance_per then color.red
 else color.gray);
#x.SetDefaultColor(Color.red);
zdot.setlineweight(4);
zdot.hidebubble();
#
 

Attachments

  • Capture.JPG
    Capture.JPG
    22.6 KB · Views: 104
Hi @halcyonguy
Very nice -such a huge improvement.
I have shaded the volume bars differently than the dot colors and now they really stand out.

Is it possible to add an arrow signal in the upper price candles as well? Something like the attached image.

I appreciate your help with this!

mixed-vol-signal.PNG
 
Last edited:

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