Kal Gandikota avatar

Linear Regression Curve in Pine Script of www.tradingview.com

chipmaker

Published: 19 Jan 2018 › Updated: 19 Jan 2018Linear Regression Curve in Pine Script of www.tradingview.com

Linear Regression Curve in Pine Script of www.tradingview.com

Please find below code for 20 Period Linear Regression Curve Fitting. Test it out in the Pine Editor of https://www.tradingview.com. More details follow as time permits!

//@version=3
study(title="LinearRegressionCurve20", shorttitle="LRC20", overlay=true)
src = close
len = input(defval=20, minval=1, title="Length")
offset = 0
out = linreg(src, len, offset)
plot(out, color=purple, linewidth=2)
//END

The Screenshot of 20 Period Linear Regression Curve(Purple line) on 1 day candles of BTSUSD(Poloniex):
Jan19_2017_BTSUSD_1DAY_20PeriodLinearRegressionCurve.png

Legal Disclaimer: I did not get bribed to write here and I am not seeking to get into insider favors. I wrote here so I get replies from fellow viewers to educate myself and for my daily expenses. Hence, if anyone uses this post for making their decisions, I am not responsible for any failures incurred.

If you found this blog post interesting and edifying please follow, upvote, resteem.

ETH Wallet - 0x0450DCB7d4084c6cc6967584263cF6fBebA761D1
BTS Wallet - chip-maker

NEO Wallet - AUdiNJDW7boeUyYYNhX86p2T8eWwuELSGr
NEOWalletPublicAddress.png

Leave Linear Regression Curve in Pine Script of www.tradingview.com to:

Written by

Read more #tradingview posts


Best Posts From Kal Gandikota

We have not curated any of chipmaker's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From Kal Gandikota