TradingView
gorx1
2020年6月26日午後12時54分

Harmonic Moving Average 

DMC Global Inc.NASDAQ

詳細

I was legitimately surprised no1 has already coded it out on TradingView, but you guys can copypaste & include it in Pine 5 if your see this xd
Here is it.
I've checked and double checked everything, the calculations are right, it can be proved by plotting mean, geometric mean & harmonic mean together and noticing that geometric mean will be always between Harmonic mean, which is always below, and Mean, which is always above.
...
Other central tendency measures are also here as well for usability.
コメント
zyrk
Hi gorx1, thanks for your time and effort. The arithmetic, geometric, and harmonic mean calculations produce the same values. So the same value is plotted 3 times. The code seems correct, though. I even re-wrote it for Pine 5, but still got the same result. Any clues?
JohnBaron
thanks for doing this - have you ever found a recursive formula for these mean types?
Bovem
Do you have a tutorial on how to use this? I assume it's similar to how one would use moving averages in general, but I am curious about how to use this one specifically. Thank you
gorx1
@Bovem, when data in your rolling window looks like this en.wikipedia.org/wiki/Logarithmic_growth
Its an assumption
詳細