The problem that people overlook when asking to calculate an angle of an average is simple: data on Y axes of a time series chart is different type from the data on X axis. Since they are completely different, the angle can not be calculated from that data. Unless you make them the compatible. Here is one possible solution: this version “converts” time into “pips” by using average true range as a value of a single time bar and that way unifies the values of X and Y axis. Using the ATR for that is an approximation (there is no 100% accurate method to do that), but it is not a bad approximation: at least it is not showing results of > 90 degrees.
This indicator uses calculation method described above and extended to be able to calculate the rest of the 18 types of averages. So that all the usual types are covered with this version.