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

FEATURE: [indicator] add v2 MACD, SMA #1184

Merged
merged 9 commits into from
Jun 1, 2023
Merged

FEATURE: [indicator] add v2 MACD, SMA #1184

merged 9 commits into from
Jun 1, 2023

Conversation

c9s
Copy link
Owner

@c9s c9s commented Jun 1, 2023

No description provided.

@bbgokarma-bot
Copy link

Welcome back! @c9s, This pull request may get 483 BBG.

@c9s c9s changed the title FEATURE: [indicator] add MACD v2 FEATURE: [indicator] add v2 MACD, SMA Jun 1, 2023
@@ -82,21 +81,3 @@ func (inc *SMA) LoadK(allKLines []types.KLine) {
inc.PushK(k)
}
}

func calculateSMA(kLines []types.KLine, window int, priceF KLineValueMapper) (float64, error) {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 498 BBG

Base automatically changed from refactor/indicator-replace-index-call to main June 1, 2023 02:14
@@ -191,14 +191,18 @@ func (s Slice) Last(i int) float64 {
return s[length-1-i]
}

func (s Slice) Truncate(size int) Slice {
if len(s) < size {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be <=.

return s
}

return s[len(s)-size:]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if size is less than or equal to 0?

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 604 BBG

@bbgokarma-bot
Copy link

Re-estimated karma: this pull request may get 624 BBG

@c9s c9s enabled auto-merge June 1, 2023 04:42
@c9s c9s merged commit 668444b into main Jun 1, 2023
@c9s c9s deleted the feature/v2indicator-macd branch June 1, 2023 04:47
@bbgokarma-bot
Copy link

Hi @c9s,

Well done! 629 BBG has been sent to your polygon wallet. Please check the following tx:

https://polygonscan.com/tx/0xf5110b44dc5af4646d0340505869529186690ff4064a5e89d8f3afbff35339f5

Thank you for your contribution!

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

Successfully merging this pull request may close these issues.

4 participants