Error 17 missing argument

What's wrong with the below code? Thanks!

function OLS_Slope(p)
	d=p-Ref(p, -1);

return m;

Plot(slope, "slope", colorBlue, styleLine);

Sum takes TWO parameters, - input array AND number of bars to calculate running sum on.
See also

To calculate running sum over ALL elements you can use Cum

1 Like