nautilus_trader icon indicating copy to clipboard operation
nautilus_trader copied to clipboard

Fix last value updating for RSI indicator

Open bartlaw opened this issue 5 months ago • 2 comments

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.md that 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.

bartlaw avatar Jun 10 '25 07:06 bartlaw

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 10 '25 07:06 CLAassistant

Hi @bartlaw

Many thanks for the fix.

Is it possible to add one test which triggers the condition? :pray:

cjdsellers avatar Jun 10 '25 21:06 cjdsellers

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.

bartlaw avatar Jun 11 '25 08:06 bartlaw

Thanks for adding the test, much appreciated!

cjdsellers avatar Jun 11 '25 11:06 cjdsellers