slope function

I really interested in a function that runs a regression and figures out the slope of the price series. I did a little bit of search. The last time that this feature is requested is 2 years ago. I am wondering if there is progress. Similar function already exists in rank optimization and OBVslopeN.

I understand I can approximate by taking the difference between price changes. But a real slope function would be far superior particularly if the stock price is choppy.

Thanks in advance