TA-Lib-Java-Examples icon indicating copy to clipboard operation
TA-Lib-Java-Examples copied to clipboard

SimpleMovingAverageExample

Open rroels opened this issue 8 years ago • 2 comments

Thanks for the example, it helped me to get things running quickly.

However, I'd like to point out a small issue in the SimpleMovingAverageExample.

Line 35 is currently: for (int i = begin.value; i <= length.value; i++) {

but it should be: for (int i = begin.value; i < begin.value + length.value; i++) {

"length" contains the amount of results, and not the index of the last result.

rroels avatar Jan 27 '18 15:01 rroels

Hey, Good catch!

Can you create a pull request?

ishanthilina avatar Feb 06 '18 15:02 ishanthilina

Fixed with Pull request #2

ishanthilina avatar Mar 02 '18 15:03 ishanthilina