mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +00:00
fix title and layout
This commit is contained in:
parent
080cfe25d9
commit
6b478b4e87
|
@ -157,7 +157,7 @@ func (k KLine) Color() string {
|
||||||
|
|
||||||
func (k KLine) SlackAttachment() slack.Attachment {
|
func (k KLine) SlackAttachment() slack.Attachment {
|
||||||
return slack.Attachment{
|
return slack.Attachment{
|
||||||
Text: fmt.Sprintf("KLine *%s* %s", k.Symbol, k.Interval),
|
Text: fmt.Sprintf("*%s* KLine %s", k.Symbol, k.Interval),
|
||||||
Color: k.Color(),
|
Color: k.Color(),
|
||||||
Fields: []slack.AttachmentField{
|
Fields: []slack.AttachmentField{
|
||||||
{Title: "Open", Value: k.Open, Short: true},
|
{Title: "Open", Value: k.Open, Short: true},
|
||||||
|
@ -358,7 +358,7 @@ func (k KLineWindow) SlackAttachment() slack.Attachment {
|
||||||
}
|
}
|
||||||
|
|
||||||
return slack.Attachment{
|
return slack.Attachment{
|
||||||
Text: fmt.Sprintf("KLine *%s* %s x %d", first.Symbol, first.Interval, windowSize),
|
Text: fmt.Sprintf("*%s* KLineWindow %s x %d", first.Symbol, first.Interval, windowSize),
|
||||||
Color: k.Color(),
|
Color: k.Color(),
|
||||||
Fields: []slack.AttachmentField{
|
Fields: []slack.AttachmentField{
|
||||||
{Title: "Open", Value: util.FormatFloat(k.GetOpen(), 2), Short: true},
|
{Title: "Open", Value: util.FormatFloat(k.GetOpen(), 2), Short: true},
|
||||||
|
|
|
@ -38,13 +38,13 @@ func (trade Trade) SlackAttachment() slack.Attachment {
|
||||||
market, ok := FindMarket(trade.Symbol)
|
market, ok := FindMarket(trade.Symbol)
|
||||||
if !ok {
|
if !ok {
|
||||||
return slack.Attachment{
|
return slack.Attachment{
|
||||||
Title: fmt.Sprintf("*%s* %s Trade", trade.Symbol, trade.Side),
|
Text: fmt.Sprintf("*%s* Trade %s", trade.Symbol, trade.Side),
|
||||||
Color: color,
|
Color: color,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return slack.Attachment{
|
return slack.Attachment{
|
||||||
Title: fmt.Sprintf("*%s* %s Trade", trade.Symbol, trade.Side),
|
Text: fmt.Sprintf("*%s* Trade %s", trade.Symbol, trade.Side),
|
||||||
Color: color,
|
Color: color,
|
||||||
// Pretext: "",
|
// Pretext: "",
|
||||||
// Text: "",
|
// Text: "",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user