note: angle calculation is not correct.
added optional time calculation and bar calculation
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.
it could be possible to create a scale with matching price/time using a method similar to renko were block advances/declines on the price axis by 1 unit and on the time axis by 1 bar, then since you now have a equal measuring unit you could extrapolate a angle