MTF Relative Volume Labels

Tiger2020

New member
What would the code look like to AddLabel for a 3 color Relative Volume Label. I want to be able to also add Aggregation Periods for a MTF Relative Volume?
 
Last edited:
Thanks Merry. So my post is in the correct thread.
There is scripting here that is an MTF Squeeze. I have that loaded and it is nice and very useful, thank you to those whom put that one together. I tried all manner of ways to get my 3 color relative volume into a similar format with zero luck. Could we have a more generic MTF "template" and some explanation how to apply differing indicators within it? Heck If I could just a get a 3 color Relative Volume (StdDev) inot a lable I might could hack out the additional agg periods to make it MTF. Also I think this would be useful to many folks here. Relative Volume is important and charting in one timeframe while being able to glance at the RV on MTF format would be most useful. So not just for me I think lots us could benefit.
Here is my 3 Color Relative Volume Study of which I have no idea how to get into a MTF AddLabel Format.


Code:
#reference RelativeVolumeStDev

declare lower;
declare zerobase;

input length = 60;
input numDev = 2.0;
input numDev2 = 0.0;
input numDev3 = 5.0;
input allowNegativeValues = yes;


def rawRelVol = (volume - Average(volume, length)) / StDev(volume, length);
plot RelVol = if allowNegativeValues then rawRelVol else Max(0, rawRelVol);
plot StDevLevel = numDev;
plot StDevLevel2 = numDev2;
plot StDevLevel3 = numDev3;


RelVol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
RelVol.SetLineWeight(1);
RelVol.DefineColor("Above", (Color.MAGENTA));
RelVol.DefineColor("Below", (Color.LIGHT_ORANGE));
RelVol.DefineColor("Above2", (Color.GREEN));

RelVol.AssignValueColor (if (RelVol >= numDev2) && (RelVol < numDev3) then RelVol.Color("Above") else if (RelVol > numDev3) then RelVol.Color("Above2") else RelVol.Color("Below"));
StDevLevel.SetDefaultColor(Color.PLUM);
StDevLevel.SetStyle(Curve.FIRM);
StDevLevel.SetLineWeight (1);
StDevLevel2.SetDefaultColor(Color.MAGENTA);
StDevLevel2.SetStyle(Curve.FIRM);
StDevLevel2.SetLineWeight (1);
StDevLevel3.SetDefaultColor(Color.LIME);
StDevLevel3.SetStyle(Curve.FIRM);
StDevLevel3.SetLineWeight (1);

# Here is my Relative Volume used in Watchlists:

Code:
plot c = Volume(period = AggregationPeriod.DAY) / Average(volume(period = AggregationPeriod.DAY), 30);
c.SetDefaultColor(Color.Black);
AssignBackgroundColor(if c > 12 then Color.CYAN
                      else if c > 7 then Color.Green
                      else if c > 5 then Color.Dark_Green
                      else if c > 3 then Color.Orange
                      else if c > 2 then Color.Pink
                      else Color.red);
#AddLabel(yes, AsText(c, NumberFormat.TWO_DECIMAL_PLACES) +"X", Color.black);
 

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

Thread starter Similar threads Forum Replies Date
B Relative Momentum Index MTF Questions 2
B MTF Stochastic Questions 1
E MTF Stacked Moving Averages Questions 3
M MTF AMA Questions 2
C MTF EMA cloud Questions 1

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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