func (h *HMA) Add(n float64) {
	h.wma[0].Add(n)
	h.wma[1].Add(n)
	h.wma[2].Add(2*h.wma[0].Get() - h.wma[1].Get())
}
Add adds a data point.
package movingaverage
import "math"
const defaultHMASize = 10
type HMA struct {
	size uint64
	wma  []*WMA
}
func NewHMA(sizes ...float64) *HMA {
	size := defaultHMASize
	if len(sizes) != 0 && sizes[0] > 1 {
		size = int(sizes[0])
	}
	wma := make([]*WMA, 3)
	wma[0] = NewWMA(size / 2)
	wma[1] = NewWMA(size)
	wma[2] = NewWMA(int(math.Sqrt(float64(size))))
	return &HMA{
		wma:  wma,
		size: uint64(size),
	}
}