180 day low display, regardless of current chart timeframe?

Tweak155

New member
Hello,

Tried searching but could not find something to help me display a simple label of lowest price in last 180 days. I've tried variations of LOW() and LOWEST(low, ##) but they all seem to be impacted by my current charting timeframe, and therefor will not always display the correct answer.

Is there a way to grab the lowest price point in the last 180 days on the current symbol so it can be added to a label? I thought about using LOWEST() and have a variable that changes the length based on GetAggregationPeriod(), but this seems a little over the top for something I perceive as likely easily obtained using existing functions.

Thanks for any help.
 

Pensar

Well-known member
VIP
Lifetime
@Tweak155 Set the aggregation period of the "low" price to daily, then use it for the price value in Lowest(). So something like this -
Code:
input bars_to_lookback = 180;
def l = low(period = aggregationperiod.DAY);
def lowest_bar = lowest(l,bars_to_lookback);
AddLabel(1,"Lowest Low in 180 Days = " + lowest_bar, color.white);
 
Thread starter Similar threads Forum Replies Date
D 90/120/180% lines on charts Questions 33
A 180 daily moving average volume code? Questions 4
kc5560 Scan the bar Lower Low input the date Questions 1
F High & Low Questions Questions 0
S New High/Low Bar Counter Questions 2

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.
Top