print side

This commit is contained in:
c9s 2020-07-18 20:35:37 +08:00
parent 2453e2db73
commit 30e8cad7c8

View File

@ -58,7 +58,12 @@ func (trader *KLineRegressionTrader) RunStrategy(ctx context.Context, strategy S
select {
case order := <-trader.orderC:
fmt.Print("o")
switch order.Side {
case types.SideTypeBuy:
fmt.Print("B")
case types.SideTypeSell:
fmt.Print("S")
}
var price float64
if order.Type == types.OrderTypeLimit {