TradingView
taylor_o
7 Jan 2022 pukul 06.07

regress 

Deskripsi

Library "regress"
produces the slope (beta), y-intercept (alpha) and coefficient of determination for a linear regression

regress(x, y, len) regress: computes alpha, beta, and r^2 for a linear regression of y on x
  Parameters:
    x: the explaining (independent) variable
    y: the dependent variable
    len: use the most recent "len" values of x and y
  Returns: [ alpha, beta, r2 ]: alpha is the x-intercept, beta is the slope, an r2 is the coefficient of determination

Note: the chart does not show anything, use the return values to compute model values in your own application, if you wish.
Lebih lanjut