-
-
Notifications
You must be signed in to change notification settings - Fork 293
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
Conversation
Welcome back! @andycheng123, This pull request may get 205 BBG. |
Codecov Report
@@ Coverage Diff @@
## main #1089 +/- ##
=======================================
Coverage 19.40% 19.40%
=======================================
Files 433 433
Lines 33419 33419
=======================================
Hits 6486 6486
Misses 26389 26389
Partials 544 544
Continue to review full report at Codecov.
|
pkg/bbgo/exit_trailing_stop.go
Outdated
@@ -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()) |
There was a problem hiding this comment.
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() ?
Re-estimated karma: this pull request may get 225 BBG |
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! |
No description provided.