diff --git a/bbgo/context.go b/bbgo/context.go index bebd7403b..d266c7b4f 100644 --- a/bbgo/context.go +++ b/bbgo/context.go @@ -19,7 +19,6 @@ type Context struct { CurrentPrice float64 Balances map[string]types.Balance - Quota map[string]types.Balance ProfitAndLossCalculator *accounting.ProfitAndLossCalculator StockManager *StockManager } diff --git a/bbgo/kline_regression.go b/bbgo/kline_regression.go index ecfacfa87..99f6017cf 100644 --- a/bbgo/kline_regression.go +++ b/bbgo/kline_regression.go @@ -41,14 +41,6 @@ func (trader *BackTestTrader) SubmitOrder(cxt context.Context, order *types.Subm func (trader *BackTestTrader) RunStrategy(ctx context.Context, strategy Strategy) (chan struct{}, error) { logrus.Infof("[regression] number of kline data: %d", len(trader.SourceKLines)) - maxExposure := 0.4 - trader.Context.Quota = make(map[string]types.Balance) - for currency, balance := range trader.Context.Balances { - quota := balance - quota.Available *= maxExposure - trader.Context.Quota[currency] = quota - } - done := make(chan struct{}) defer close(done)