mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
add kline color and submitMarketOrder method
This commit is contained in:
parent
884a9730f1
commit
d28bec2a05
|
@ -128,8 +128,16 @@ func (k KLine) String() string {
|
|||
|
||||
|
||||
func (k KLine) SlackAttachment() slack.Attachment {
|
||||
var color = ""
|
||||
if k.GetTrend() > 0 {
|
||||
color = "green"
|
||||
} else if k.GetTrend() < 0 {
|
||||
color = "red"
|
||||
}
|
||||
|
||||
return slack.Attachment{
|
||||
Text: "KLine",
|
||||
Color: color,
|
||||
Fields: []slack.AttachmentField{
|
||||
{
|
||||
Title: "Open",
|
||||
|
|
Loading…
Reference in New Issue
Block a user