Adding two custom columns to watchlist for Average Price Movements


New member
I am looking to add two columns to my watchlist using the Possible Daily Support and Possible Daily Resistance Values the Average Price Movement creates. I know how to add the custom items but since the script returns two values I can't seem to have one for each column. Here is the original script I am using created by Ben Ten. Anyone have any ideas? I would assume I could remove one and it would work but it isn't.

# Average Price Movements
# Assembled by BenTen at
# Converted from

input aggregationPeriod = AggregationPeriod.DAY;
def open = open(period = aggregationPeriod);
def high = high(period = aggregationPeriod);
def low = low(period = aggregationPeriod);
def dayrange = (high - low);

def r1 = dayrange[1];
def r2 = dayrange[2];
def r3 = dayrange[3];
def r4 = dayrange[4];
def r5 = dayrange[5];
def r6 = dayrange[6];
def r7 = dayrange[7];
def r8 = dayrange[8];
def r9 = dayrange[9];
def r10 = dayrange[10];

def adr_10 = (r1 + r2 + r3 + r4 + r5 + r6 + r7 + r8 + r9 + r10) / 10;
def adr_5 = (r1 + r2 + r3 + r4 + r5) / 5;

def hl1 = (open + (adr_10 / 2));
def ll1 = (open - (adr_10 / 2));
def hl2 = (open + (adr_5 / 2));
def ll2 = (open - (adr_5 / 2));

def h1 = hl1;
def l1 = ll1;
def h2 = hl2;
def l2 = ll2;

AddCloud(h1, h2, Color.RED, Color.RED);
AddCloud(l1, l2, Color.GREEN, Color.GREEN);


#Edited By Playstation 23.05.2020
#You can set whether to show the bubbles. Change or add the h1,h2,l1,l2 values to your preference.

input showBubble = yes;
def SR = showBubble and !IsNaN(close) and IsNaN(close [-1] ) && HighestAll(BarNumber());

#This will show the price at the support and resistance levels.
AddChartBubble(SR,h2,Concat("R: ",Round(h2)),Color.RED);
AddChartBubble(SR,l2,Concat("S: ",Round(l2)),Color.GREEN);

#Swap hashtags if you want just the Resistance/Support words.
@lzstock You would need to modify the script to utilize either a plot or AddLabel() instead of AddChartBubble() based on the same conditions... If you use plot you can then simply reference the Study's plot that you want for your Custom Watchlist Column...

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

Thanks. When I change the line to AddLabel it looks like this

AddLabel(SR,h2,Concat("R: ",Round(h2)),Color.RED);

It generates this for an error
3 params expected but 4 found while calling addlabel at 50:1
Expected class at 50:1

Any idea?

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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