trading-signals icon indicating copy to clipboard operation
trading-signals copied to clipboard

Bollinger Bands can now accept different smoothing (Moving Averages)

Open o-nazaruk opened this issue 1 year ago • 6 comments

Checklist for new indicators

  • [ ] Indicator is documented and implemented by extending BigIndicatorSeries
  • [x] A "faster" version of this indicator is implemented by extending NumberIndicatorSeries
  • [ ] Tests for getResult are present
  • [ ] Tests for highest and lowest result caching are present (if not already existent for base class)
  • [ ] Tests for error handling are present (if not already existent for base class)
  • [ ] Indicators (standard & faster version) are exposed in src/index.ts
  • [ ] Indicators (standard & faster version) are added to startBenchmark.ts
  • [ ] Indicator is listed in README.md

o-nazaruk avatar Apr 02 '24 15:04 o-nazaruk

Codecov Report

Attention: Patch coverage is 31.50685% with 50 lines in your changes are missing coverage. Please review.

Project coverage is 97.87%. Comparing base (ebb6c01) to head (7c995a5). Report is 38 commits behind head on main.

Files Patch % Lines
src/WSMA/WSMA.ts 14.28% 24 Missing :warning:
src/EMA/EMA.ts 14.81% 23 Missing :warning:
src/SMA/SMA.ts 57.14% 3 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##              main     #662      +/-   ##
===========================================
- Coverage   100.00%   97.87%   -2.13%     
===========================================
  Files           36       36              
  Lines         2290     2357      +67     
  Branches       248      249       +1     
===========================================
+ Hits          2290     2307      +17     
- Misses           0       50      +50     
Flag Coverage Δ
unittests 97.87% <31.50%> (-2.13%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Apr 03 '24 17:04 codecov-commenter

Hi @o-nazaruk, do you need any help resolving the code conflicts or writing tests for it?

bennycode avatar Apr 10 '24 09:04 bennycode

Hey @o-nazaruk, are you still interested in getting this merged? I think it is a very good change that you proposed here. :)

bennycode avatar Apr 18 '24 07:04 bennycode

Hello @bennycode !

I haven't had a chance to have the tests developed for now. It's been quite busy for me haha. Up to you in terms of if you want the tests done sooner. I don't know when I will have free time - but once I am free I will certainly improve coverage

o-nazaruk avatar Apr 18 '24 07:04 o-nazaruk

@o-nazaruk can you create a new PR that add the smoothing parameter to the constructur of Bollinger Bands? I can take over from there.

bennycode avatar May 07 '24 05:05 bennycode

Hi @o-nazaruk, I am trying to fix your PR to match the latest "main" branch. One thing that I noticed is that you turned getResultFromBatch into an instance method instead of keeping it static. Let's try to run with the static method as it is not necessary to create an instance of an indicator with a specific interval first. We just have to figure out how we can make a static method part of the MovingAverage abstract class.

bennycode avatar May 08 '24 14:05 bennycode

I'm closing this due to inactivity. @o-nazaruk, please feel free to create a new PR if you still want this feature. I am eager to support you on this. 😊

bennycode avatar Jun 18 '24 08:06 bennycode