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

improve/exit: show symbol in trailing stop triggered message #1089

Merged
merged 2 commits into from
Mar 8, 2023

Conversation

andycheng123
Copy link
Collaborator

No description provided.

@bbgokarma-bot
Copy link

Welcome back! @andycheng123, This pull request may get 205 BBG.

@codecov
Copy link

codecov bot commented Mar 8, 2023

Codecov Report

Merging #1089 (58b2678) into main (f26568e) will not change coverage.
The diff coverage is 50.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1089   +/-   ##
=======================================
  Coverage   19.40%   19.40%           
=======================================
  Files         433      433           
  Lines       33419    33419           
=======================================
  Hits         6486     6486           
  Misses      26389    26389           
  Partials      544      544           
Impacted Files Coverage Δ
pkg/bbgo/exit_trailing_stop.go 49.10% <50.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f26568e...58b2678. Read the comment docs.

@@ -100,7 +100,7 @@ func (s *TrailingStop2) checkStopPrice(price fixedpoint.Value, position *types.P
// check if we have the minimal profit
roi := position.ROI(price)
if roi.Compare(s.MinProfit) >= 0 {
Notify("[trailingStop] activated: ROI %f > minimal profit ratio %f", roi.Float64(), s.MinProfit.Float64())
Notify("[trailingStop] activated: %s ROI %f > minimal profit ratio %f", s.Symbol, roi.Float64(), s.MinProfit.Float64())
Copy link
Owner

Choose a reason for hiding this comment

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

can we use roi.PercentageString() instead of FLoat64() ?

@bbgokarma-bot
Copy link

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

@c9s c9s merged commit 3a6d210 into c9s:main Mar 8, 2023
@bbgokarma-bot
Copy link

Hi @andycheng123,

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

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

Thank you for your contribution!

@andycheng123 andycheng123 deleted the improve/exit branch March 8, 2023 11:25
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.

3 participants