Volume-Supported Linear Regression Trend

Hello Traders,

Linear Regression gives us some abilities to calculate the trend and if we combine it with volume then we may get very good results. Because if there is no volume support at up/downtrends then the trend may have a reversal soon. we also need to check the trend in different periods. With all this info, I developed Volume-Supported Linear Regression Trend script. The script checks linear regression of price and volume and then calculates trend direction and strength.

You have option to set Source, Short-Term Period and Long-Term Period. you can set them as you wish.

By default:
Close is used as "Source"
Short-Term Period is 20
Long-Term Period is 50

in following screenshot I tried to explain short term trend (for uptrend). Volume supports the trend? any volume pressure on trend? possible reversal? same idea while there is downtrend.

in following screenshot I tried to explain long term trend:

You can also check Positive/Negative Divergences to figure out possible reversals (to automate it, you can use Divergence for Many Indicators v4, it has ability to check divergences on external indicators)


Phát hành các Ghi chú: _rate function fixed. (Thanks to @Earthless85)
Phát hành các Ghi chú: Added explanation
unnecessary commands removed
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

Awesome, keep up the good work!
500 xu
+9 Phản hồi
@baymucuk, Thank you
+1 Phản hồi
Outstanding just like everything you create you are an asset to the platform @TradingView
First time I have used coins but hope they can go some way to showing my apprieciation for you work @LonesomeTheBlue
200 xu
+3 Phản hồi
@IamDobby, Thanks!
Phản hồi
Great man you are the future of market
100 xu
+1 Phản hồi
@akashguin, Thank you
Phản hồi
Great, thanks for sharing. I'm still looking forward to a buy/sell arrow script capable of catching top and bottom without repainting from you. I believe you can make happen!
+12 Phản hồi
kannantraders1990 ilesanmipepsi
@ilesanmipepsi, sir have u found a buy arrow script for this
Phản hồi
ilesanmipepsi kannantraders1990
Phản hồi
Great idea, thanks for the code. I've one question - how is it plotting histogram on securities that don't share volume data? (Index - NSE:NIFTY for instance)
+9 Phản hồi