Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Print strat #15

Merged
merged 3 commits into from
Oct 2, 2018
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions cmd/trade.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,25 @@ func init() {
}
log.Printf("Trading %s:%s for %s:%s\n", botConfig.ASSET_CODE_A, botConfig.ISSUER_A, botConfig.ASSET_CODE_B, botConfig.ISSUER_B)

//Add current strategy to the log
var strat_display string
switch *strategy {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can do without the switch-case to keep it simple. Just use *strategy instead directly in the log statement.

case "balanced":
strat_display = "Balanced"
case "sell":
strat_display = "Sell"
case "buysell":
strat_display = "Buy/Sell"
case "mirror":
strat_display = "Mirror"
case "delete":
strat_display = "Delete"
default:
strat_display = *strategy
}

log.Printf("Current strategy: %s\n", strat_display)

client := &horizon.Client{
URL: botConfig.HORIZON_URL,
HTTP: http.DefaultClient,
Expand Down