nautilus_trader
nautilus_trader copied to clipboard
Fix last value updating for RSI indicator
Pull Request
It fixes this issue: https://github.com/nautechsystems/nautilus_trader/issues/2673
Summary
It sets the previous indicator value for next iteration in case of division by 0
Related Issues/PRs
https://github.com/nautechsystems/nautilus_trader/issues/2673
Type of change
- [x] Bug fix (non-breaking)
- [ ] New feature (non-breaking)
- [ ] Breaking change (impacts existing behavior)
- [ ] Documentation update
- [ ] Maintenance / chore
Breaking change details (if applicable)
Release notes
- [x] I added a concise entry to
RELEASES.mdthat follows the existing conventions (when applicable)
Testing
Ensure new or changed logic is covered by tests.
- [ ] Affected code paths are already covered by the test suite
- [ ] I added/updated tests to cover new or changed logic
I've tested code by running extensive backtest and comparing results.
Hi @bartlaw
Many thanks for the fix.
Is it possible to add one test which triggers the condition? :pray:
Hi @cjdsellers Thanks for pointing this out. I've added a test that passes only after this bug fix. Let me know if I should do anything else. I am new to open source dev.
Thanks for adding the test, much appreciated!