Skip to content
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

Indicators: Moving Average should return an error if I request a period larger than the length of my array of candles #2

Open
Vanclief opened this issue Jul 8, 2021 · 2 comments
Assignees

Comments

@Vanclief
Copy link
Owner

Vanclief commented Jul 8, 2021

If I have an slice myCandles comprised of 10 candles, and I request MovingAverage(myCandles, 20) I should get an error, instead I get a panic.

@Vanclief
Copy link
Owner Author

Vanclief commented Jul 8, 2021

Error: panic: runtime error: slice bounds out of range [:20] with capacity 1

@Vanclief
Copy link
Owner Author

Fixed in c3d50a4, but missing test cases @officialnoria

Repository owner deleted a comment from theHinneh Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants