optimizer: kline directory by backtest period

This commit is contained in:
Andy Cheng 2022-06-14 12:54:05 +08:00
parent 8f18b414b6
commit 7ffe010c57

View File

@ -295,7 +295,10 @@ var BacktestCmd = &cobra.Command{
return err
}
kLineDataDir := filepath.Join(outputDirectory, "shared/klines")
startTimeStr := startTime.Format("20060102")
endTimeStr := endTime.Format("20060102")
kLineSubDir := strings.Join([]string{"klines", "_", startTimeStr, "-", endTimeStr}, "")
kLineDataDir := filepath.Join(outputDirectory, "shared", kLineSubDir)
if err := util.SafeMkdirAll(kLineDataDir); err != nil {
return err
}