Pair slope/hedge uses linear regression to calculate the hedge ratio (slope) between the two assets within a period. It allows you to specify a "from" and a "to" candle. Example: "A regression from 1000 candles back in time and ignore the last 100 candles. This would result in making a regression of 900 candles in total." The formula used to perform the...
There are several Linear Regression indicator in the Public Library, but I don't think there is one that converts the Linear Regression (LR) curve into angle in degrees, relative to a set reference frame. Due to the large price range between tickers, creating this indicator isn't as straight forward as I originally thought. For example, given the same time period,...
ReDraw script calculates the historical returns and drawdown for the given periods. By default, the return of the linear regression trends is displayed (can be turned off in settings). In this mode, two linear regression trends are being computed for both long and short periods, and the percent value indicates the "return of the trend" for the corresponding...