mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 00:05:15 +00:00
style: fix margin calculation
This commit is contained in:
parent
452e761ce6
commit
8dcd6f2f72
|
@ -51,7 +51,7 @@ func PnLEmojiMargin(pnl, margin, resolution fixedpoint.Value) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
if pnl.Sign() < 0 {
|
if pnl.Sign() < 0 {
|
||||||
level := min((margin.Neg()).Div(resolution).Int(), MaxEmojiRepeat)
|
level := min(margin.Abs().Div(resolution).Int(), MaxEmojiRepeat)
|
||||||
return strings.Repeat(LossEmoji, level)
|
return strings.Repeat(LossEmoji, level)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user