Volume ROC 4hr:30min

westonsloan

New member
#Error message tells me that I have provided 3 positional arguments where only two are needed. Help me show the label that encompasses the Power function without error
def xvolume4 = (volume(period = "4 hour")[1]);
def vvol4 = (volume(period = "4 hour"));
plot rvolx4 = Round((vvol4 / xvolume4), 1);
def rvolxapi4 = rvolx4;

def xvolume = (volume(period = "30 min")[1]);
def vvol = (volume(period = "30 min"));
plot rvolx = Round((vvol / xvolume), 1);
def rvolxapi = rvolx;

plot Power = (rvolxapi4 / rvolxapi);
AddLabel(yes, Concat("Fold: ", Power, Color.LIGHT_ORANGE));
 
Solution
#Error message tells me that I have provided 3 positional arguments where only two are needed. Help me show the label that encompasses the Power function without error
There were other syntax errors besides the label in your script.
Below find the corrected syntax and some suggested formatting styles which hopefully, will further your quest:
ldtyvmz.png

Ruby:
# ########################################################
# Volume ROC 4hr:30min
# @westonsloan 8/23
# ########################################################
declare lower ;
declare real_size;

def volume4 = volume(period = AggregationPeriod.FOUR_HOURS);
def volume30 = volume(period = AggregationPeriod.THIRTY_MIN);

plot rvol4  = volume4 /...
#Error message tells me that I have provided 3 positional arguments where only two are needed. Help me show the label that encompasses the Power function without error
There were other syntax errors besides the label in your script.
Below find the corrected syntax and some suggested formatting styles which hopefully, will further your quest:
ldtyvmz.png

Ruby:
# ########################################################
# Volume ROC 4hr:30min
# @westonsloan 8/23
# ########################################################
declare lower ;
declare real_size;

def volume4 = volume(period = AggregationPeriod.FOUR_HOURS);
def volume30 = volume(period = AggregationPeriod.THIRTY_MIN);

plot rvol4  = volume4 / volume4[1];
     rvol4.SetDefaultColor(Color.DARK_ORANGE) ;
     rvol4.SetLineWeight(1);

plot rvol30 = volume30 / volume30[1];
     rvol30.SetDefaultColor(Color.PLUM) ;
     rvol30.SetLineWeight(1);

plot Power = rvol4 / rvol30 ;
     Power.SetDefaultColor(Color.BLUE) ;
     Power.SetLineWeight(2);
     Power.HideBubble() ;
     Power.HideTitle() ;
     Power.SetStyle(Curve.SHORT_DASH);

AddCloud(rvol4,  rvol30,  Color.LIGHT_ORANGE,  Color.VIOLET);
AddLabel(yes, "Fold: " + Power, if Power < rvol30 then color.dark_red else color.dark_green);
 
Last edited:
Solution

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