-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hma is not exponential hull moving average but in docs it is mentioned as exponential moving average #868
Comments
Hey @XotEmBotZ Thanks for the catch! 🤦🏼♂️ Yeah, it’s the standard Hull Moving Average, hma, and not Hull Exponentional Moving Average. I can update the doc on my next push. Thanks, |
I want exponential moving average also. When can i see ehma in the development branch? |
You are talking about this? //@version=5
indicator("EHMA", overlay = true)
hma(src, len)=>
ta.ema(2 * ta.ema(src, int(len/2)) - ta.ema(src, len), int(math.sqrt(len/2)))
Source = input.source(close)
Length = input.int(50, minval = 2)
hma = hma(Source, Length)
hma_dif = hma - hma[1]
colour = math.sign(hma_dif) == 1 ? color.green : color.red
plot(hma, "EHMA", colour) Should be doable with replacing wma with ma and setting mamode to default to “hma”. Then you can select whichever ma you want. As an example, see hilo, kama, smma, supertrend, et al… Should be an easy PR to hma if that is a case… if you want a standalone, then a separate PR for ehma woul d be required. |
Both approach works for me. Its up to you to decide which approach is better since you know the library structure better than me. |
@twopirllc |
Sounds good. But I don’t have the time to manage another feature. Regarding:
This is the recommended solution as it is easier to implement and is the most flexible. |
@twopirllc Kindly merge which one you like and close the other.
|
Can I expect it to be merged before 11th? |
No. I have a lot of stuff on my plate. There is a lot of stuff to update and it will be worked into it. |
Which version are you running? The lastest version is on Github. Pip is for major releases.
0.4.19b0
Do you have TA Lib also installed in your environment?
No
Have you tried the development version? Did it resolve the issue?
Yes tried but not fixed yet
Describe the bug
The docs mentions hma as
* _Hull Exponential Moving Average_: **hma**
But after comparison it is not exponential.To Reproduce
Expected behavior
Should provide exponential hull moving average not hull moving average.
Else the docs should be changed to null moving average
Additional context
If hull moving average is the correct output can I give a PR for EHMA. If yes then mention the correct procedure
The text was updated successfully, but these errors were encountered: