greyblake / ta-rs

Technical analysis library for Rust language
MIT License
691 stars 129 forks source link

Feature request: Hull moving average #36

Open xelra opened 3 years ago

xelra commented 3 years ago

It would be great, if you could add the HMA (Hull Moving Average) indicator.

This is the formula in PineScript:

length = input(9, minval=1)
src = input(close, title="Source")
hma = wma(2*wma(src, length/2)-wma(src, length), round(sqrt(length)))

Here is the website from Alan Hull, explaining the indicator. It's a moving average that is smoother than EMA and less lagging.

greyblake commented 3 years ago

@xelra Thanks for the report. If you want it soon I'd recommend you implementing the indicator and opening a PR.

pindaroso commented 3 years ago

Checking in on this. Any progress here? Would love to contribute.

greyblake commented 3 years ago

@pindaroso Go ahead. (even though, history of PRs stuck is a little bit discouraging). I'll try to find some time to handle issues/PRs for ta.