Forecasting - Least Squares RegressionTested on 5m TF with EURUSD. Settings should be modified appropriately for other TFs, lookbacks and securities. This indicator does not repaint.
Ols
ORDINARY LEAST SQUARES Slope by @XeL_ArjonaORDINARY LEAST SQUARES Slope by @XeL_Arjona
Ver. 1 by Ricardo M Arjona @XeL_Arjona
DISCLAIMER:
The Following indicator/code IS NOT intended to be a formal investment advice or recommendation by the author, nor should be construed as such. Users will be fully responsible by their use regarding their own trading vehicles/assets.
The embedded code and ideas within this work are FREELY AND PUBLICLY available on the Web for NON LUCRATIVE ACTIVITIES and must remain as is.
WHAT'S THIS?
This is a REAL mathematically approach of an ORDINARY LEAST SQUARES LINE FITTING SLOPE as TradingView currently don't have a native one embedded, neither as a pine function. Other "Sope" indicators from this linear regression model I found on public library are currently based on "momentum" rather tan slope.
Any modifications or additions are quite welcome!
Cheers!
@XeL_Arjona