Okay, this is a simple trick with the built-in Linear Regression indicator. I have used two instances of the indicator, but with different sources. The first one uses price of an instrument and the second one uses volume of an instrument. Yes, it is possible to use non-standard source because the indicator has a special input for that.
As result you get a simple tool for trend analysis and its common cases like trend exhaustion or confirmation.