Skip to content

Commit

Permalink
Update trader.go
Browse files Browse the repository at this point in the history
  • Loading branch information
cashmen authored Jun 16, 2020
1 parent e9cc642 commit 1636481
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/character/trader.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func (t *Trader) Start(signalChan <-chan *util.Signal) {
} else if signal.Side == "short" {
curMP = orderbook.Bid[0].Price
}
usdBalance := t.wallet.GetBalance("USD")
usdBalance := t.wallet.GetBalance("USD") + t.wallet.GetBalance("BTC") * curMP
util.Info(t.tag, fmt.Sprintf("current balance: %.2f", usdBalance))
size := t.initBalance / curMP * t.leverage
go t.openPosition(signal, size, curMP)
Expand Down

0 comments on commit 1636481

Please sign in to comment.