Difference between current day high and low as watchlist column

BenTen

Administrative
Staff member
Staff
VIP
Lifetime
What's the duration of the period? Previous day's high and low?

Here is an example for your watchlist column:

Ruby:
def prev_high = high[1];
def prev_low = low[1];

plot value = prev_high - prev_low;

Set the timeframe of the column to D (daily).
 
Hi. I'm looking for an indicator that shows me the high and the low of the price of the day on the watchlist. In the graph you can see the bubble with the price, I would like to have in the following list the notice of those ups and downs in the price. I will be very grateful if you can help me.
 
Hi. I'm looking for an indicator that shows me the high and the low of the price of the day on the watchlist. In the graph you can see the bubble with the price, I would like to have in the following list the notice of those ups and downs in the price. I will be very grateful if you can help me.
you said...

I would like to have in the following list the notice of those ups and downs in the price

1)what list? and what do you mean by notice?

2) define ups and downs? ups and downs from what? close to open? open to high? low to high? high to low open to low? you will have to explain more?
 
you said...

I would like to have in the following list the notice of those ups and downs in the price

1)what list? and what do you mean by notice?

2) define ups and downs? ups and downs from what? close to open? open to high? low to high? high to low open to low? you will have to explain more?
Hi: I need help with a custom column to show the difference between current high and current Last? Thanks
 
@MKToronto You left SO much out of your query. Thinkscript works based on definitions "def" statements. The statements are written as mathematical expressions. You will need to mathematically define the meaning of "high" (52 week High, Day High, the High of the Current Candle) and the meaning of "difference" (dollar difference, percentage difference, etc.)

In the below example, High is the 52-week High and Difference is the Percentage Diff. As this is an example, I am doing this as a label on a chart to more clearly illustrate the math. When you have it customized to your definitions, comment out the AddLabel statement (put a # in front of it, and then you can create your watchlist.
PS: this example only works on a watchlist or chart set to daily as in 252 DAYS in a year. Using a different aggregation, use different math.
mKKWlAe.png

https://usethinkscript.com/threads/thinkorswim-52-week-highs-lows-scanner-and-watchlist-column.809/#post-6335
Ruby:
# Percentage Off 52 Week High
# Nick Name NAG®
# 11.02.2015

# This assumes a daily aggregation.  You will need to use
# daily or higher, adjust the 252 length as needed.

def The52WkHigh = Highest(high, 252) ; 
plot percentage = Round((close / The52WkHigh  - 1) * 100);
AddLabel(yes, "Last: " +close +" | High: " +The52WkHigh +" | %: " +percentage, color.blue);
HTH
 

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