corgalicious

Responsive Linear Regression Channels

This is a linear trend indicator that can:
- automagically adjust to different chart resolutions
- snap to day/session boundaries on intraday
- totally not do the above and use ye olde good fixed lookback window
- show the regression trend and its RMSE channels
- disregard the trend and just show the period average and standard deviation lines (often acting as support and resistance )

The main idea was to allow you to quickly view linear trends for different time periods without having to calculate the required amount of bars.
By default, you will be able to quickly switch between 1-3 months, 6 months, 1 year, 2 years and 5 years of data, as well as various daily lookback periods.
Please adjust resolution settings to your liking.

Caveats:
- More data means more noise and slower calculations.
- HLC3 source is recommended, especially at resolutions above hourly.
- Trend will be slightly different if you use extended hours.
- If you use extended hours and don't have a data subscription, trend will be SUBSTANTIALLY different, especially at smaller resolutions like 1m.
- You might want to use 3.5 days per week for crypto (it's 7 days by default).

Known problems:
- If you can't see the trendlines , scroll to the left or zoom out - the origin could be outside of your viewport.
- Futures' sessions start on the previous day. We currently snap only to day boundaries, not session breaks.
- UVXY and the like that have extremely high price datapoints. The calculations will be wrong on some resolutions.
- Replay can freeze circa bar_index 244 — disable smart lookback and keep your window under 240 bars if you encounter this.

ACKNOWLEDGEMENTS:
Many thanks to alexgrover for his extremely efficient functions (used with permission)
Mã nguồn mở

Với tinh thần của TradingView, tác giả đã xuất bản tập lệnh theo mã nguồn mở, vì thế trader có thể dễ dàng hiểu và tùy chỉnh được. Bạn có thể sử dụng miễn phí, hoặc tùy chỉnh lại mã đã được cấp phép bởi Quy tắc Chung. Bạn có thể sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Bình luận

500 xu
+4 Phản hồi
This publication is now featured in our Editors' Picks. In the name of all TradingView traders, thank you for your valuable contribution to the TradingView community, and congrats!
+6 Phản hồi
corgalicious PineCoders
@PineCoders, wow thanks! It's an honor!
+6 Phản hồi
Does this work on all time frames?
+5 Phản hồi
@JS009, yes, it's literally what this indicator is for
Phản hồi
thabeger corgalicious
@corgalicious, I cannot get this to work on 5 min. crypto's..........
Phản hồi
@thabeger, try zooming the chart out a bit
Phản hồi
thabeger corgalicious
@corgalicious, Got it! How can I make this on a 5 day period? I tried using the settings but it does not appear to change the length? I really appreciate this indicator, it is similar to the standard deviation channel on TOS.
Phản hồi
@thabeger, thanks! Have you tried adjusting period settings at the bottom of the settings pane? You might need to scroll down, depending on your display height.

There's a section called SMART PERIOD FINE-TUNING that could help with this. You can assign custom day ranges for 1m, 3m/5m and 10m intervals; everything else is either weeks or bars.

So if you wanted to see 5 days, you could map the 3/5m to 5 days. Just play around with the settings, see what makes most sense to you. :)

(re: TOS — they are similar indeed, but this is actually the StdErr one. StDev on TOS is not giving you the correct visualization for the method it uses)
Phản hồi
thabeger thabeger
@corgalicious I love this indicator! Anyway to incorporate an alert when it gets to a certain level?
Phản hồi
Trang chủ Bộ lọc cổ phiếu Bộ lọc Forex Bộ lọc Tiền điện tử Lịch kinh tế Giới thiệu Tính năng Biểu đồ Trả phí Giới thiệu bạn Quy tắc Áp dụng Trung tâm Trợ giúp Giải pháp cho Website & Nhà môi giới Widget Giải pháp biểu đồ Thư viện Biểu đồ Lightweight Blog & Tin tức Twitter
Hồ sơ Tùy chỉnh Hồ sơ Tài khoản và Thanh toán Giới thiệu bạn Xu Ticket Hỗ trợ của tôi Trung tâm Trợ giúp Tin nhắn riêng Trò chuyện Đăng xuất