mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
interval: avoid syncing 1s klines as default from backtest config syncSecKLines
This commit is contained in:
parent
18acd668a7
commit
763bb45842
|
@ -138,6 +138,9 @@ type Backtest struct {
|
|||
Accounts map[string]BacktestAccount `json:"accounts" yaml:"accounts"`
|
||||
Symbols []string `json:"symbols" yaml:"symbols"`
|
||||
Sessions []string `json:"sessions" yaml:"sessions"`
|
||||
|
||||
// sync 1 second interval KLines
|
||||
SyncSecKLines bool `json:"syncSecKLines,omitempty" yaml:"syncSecKLines,omitempty"`
|
||||
}
|
||||
|
||||
func (b *Backtest) GetAccount(n string) BacktestAccount {
|
||||
|
|
|
@ -747,6 +747,9 @@ func sync(ctx context.Context, userConfig *bbgo.Config, backtestService *service
|
|||
} else {
|
||||
supportIntervals = types.SupportedIntervals
|
||||
}
|
||||
if !userConfig.Backtest.SyncSecKLines {
|
||||
delete(supportIntervals, types.Interval1s)
|
||||
}
|
||||
|
||||
// sort intervals
|
||||
var intervals []types.Interval
|
||||
|
|
Loading…
Reference in New Issue
Block a user