mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
optimizer: share klines in report
This commit is contained in:
parent
e60e2177f9
commit
70d6d8f5db
|
@ -211,7 +211,7 @@ const removeDuplicatedKLines = (klines: Array<KLine>): Array<KLine> => {
|
||||||
|
|
||||||
function fetchKLines(basePath: string, runID: string, symbol: string, interval: string) {
|
function fetchKLines(basePath: string, runID: string, symbol: string, interval: string) {
|
||||||
return fetch(
|
return fetch(
|
||||||
`${basePath}/${runID}/klines/${symbol}-${interval}.tsv`,
|
`${basePath}/klines/${symbol}-${interval}.tsv`,
|
||||||
)
|
)
|
||||||
.then((response) => response.text())
|
.then((response) => response.text())
|
||||||
.then((data) => tsvParse(data, parseKline()))
|
.then((data) => tsvParse(data, parseKline()))
|
||||||
|
|
|
@ -291,8 +291,11 @@ var BacktestCmd = &cobra.Command{
|
||||||
// reportDir = filepath.Join(reportDir, backtestSessionName)
|
// reportDir = filepath.Join(reportDir, backtestSessionName)
|
||||||
reportDir = filepath.Join(reportDir, runID)
|
reportDir = filepath.Join(reportDir, runID)
|
||||||
}
|
}
|
||||||
|
if err := util.SafeMkdirAll(reportDir); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
kLineDataDir := filepath.Join(reportDir, "klines")
|
kLineDataDir := filepath.Join(outputDirectory, "klines")
|
||||||
if err := util.SafeMkdirAll(kLineDataDir); err != nil {
|
if err := util.SafeMkdirAll(kLineDataDir); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user