use UnrealizedProfit for color

This commit is contained in:
c9s 2020-08-06 13:31:41 +08:00
parent 1d6b69e406
commit bfe38b8815

View File

@ -151,7 +151,7 @@ func (report ProfitAndLossReport) Print() {
func (report ProfitAndLossReport) SlackAttachment() slack.Attachment {
var color = ""
if report.Profit > 0 {
if report.UnrealizedProfit > 0 {
color = slackstyle.Green
} else {
color = slackstyle.Red