Closed liamwh closed 3 years ago
Thank you very much Liam for filing the issue. Let me compare the calculations and fix it. I can definitely use your help to validate it.
Thank you very much Liam for filing the issue. Let me compare the calculations and fix it. I can definitely use your help to validate it.
No problem, just let me know which branch to pull and I'll happily share the results of my testing! 👍
Cheers Cinar!
For what it's worth, as a cheat / workaround, I've written this:
func AccelerationBands(high, low, close []float64) ([]float64, []float64, []float64) {
checkSameSize(high, low, close)
k := addBy(multiplyBy(divide(substract(high, low), add(high, low)), 4), 1)
upperBand := Sma(20, multiply(high, k))
middleBand := Sma(20, close)
var lowerBand []float64
for i, upperValue := range upperBand {
lowerBand = append(lowerBand, (middleBand[i] - (upperValue - middleBand[i])))
}
return upperBand, middleBand, lowerBand
}
Hi Liam, I found a mistake in lower band calculation. Could you try with v1.2.4 to see if it fixed the problem for your calculation?
Hi Liam, I found a mistake in lower band calculation. Could you try with v1.2.4 to see if it fixed the problem for your calculation?
It's perfect now, great work and thanks again Cinar!
Hi Liam, you are very welcome, I am glad to hear that it worked.
I am trying to identify the next set of technical indicators to include to the module. If there any specific ones that you like to see included please let me know by filing an issue. Many thanks!
Maths for acceleration lower band appears to be incorrect
Expected: 1m:
15m:
1h:
To Reproduce +
Expected behavior Formula to calculate the lower band would correlate with the following pinescript:
Additional context Just wanted to say I'm loving using the package, thanks for your great work Cinar! I would be absolutely willing to contribute but maths really isn't my strong suit 😅