OPEN-SOURCE SCRIPT

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)
快照


Enjoy!



發布通知
_rate function fixed. (Thanks to Earthless85)
發布通知
Added explanation
unnecessary commands removed
發布通知
options added for the lines and columns
buypressuredailychartsDaily PivotshighertimeframesLinear RegressionlonesomethebluesellpressureSupply ZonetrendtradingVolumeVolume Weighted Moving Average (VWMA)

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明