Auto Trend Lines Indicator for ThinkorSwim

How can I get it to show me trendlines for full 5 days?

trends.png
 

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

@Pumper You can extend the trendlines by increasing their lengths... For example, if you are using a 5D 30M chart, without extended hours, you would have 13 candles per day or 65 candles over a 5 day period... For alternate timeframes, just do the same math of candles per day times days plotted... Based on the 5D 5m chart above you would have 390 candles... That's 12 candles per hour times 6.5 hours of trading times 5 days...
 
@Pumper You can extend the trendlines by increasing their lengths... For example, if you are using a 5D 30M chart, without extended hours, you would have 13 candles per day or 65 candles over a 5 day period... For alternate timeframes, just do the same math of candles per day times days plotted... Based on the 5D 5m chart above you would have 390 candles... That's 12 candles per hour times 6.5 hours of trading times 5 days...

But I want intraday trendlines. Don't really care for trendlines overlapping over multiple days. So if I'm on a 5m 5D chart, I want to see trendlines for each of the 5 days. How can I do that?

EDIT: Maybe I'm better off using a Moving average lol
 
Last edited:
But I want intraday trendlines. Don't really care for trendlines overlapping over multiple days. So if I'm on a 5m 5D chart, I want to see trendlines for each of the 5 days. How can I do that?

EDIT: Maybe I'm better off using a Moving average lol

The only way to have trendline channels by day, if it happens to be possible, would require drawing them based on trading start and end times... But, like I alluded to, it may not be possible... I guess you need to ask yourself just how important 5 days of individual trendline channels would be for your overall trading system... And, yes, maybe MA's would be a better tool for the job and then optionally use a trendline channel only for the current day...
 
@dmillz a quick and dirty way would be to change the def in this line: def slope2a = TL_Bull2 > TL_Bull2[1]; to a plot: plot slope2a = TL_Bull2 > TL_Bull2[1]; You should add this line: slope2a.hide(); so no plots get added to your chart.

"plot" allows that field to show up in the Scan Hacker. Now you should be able to pick slope2a to be true which will scans for a positive slope of the 30-length line.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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