支持1d级别插针模型

This commit is contained in:
2026-08-25 09:23:30 +08:00
parent baddd7763d
commit c0df80154b
12 changed files with 299 additions and 65 deletions

View File

@@ -25,21 +25,22 @@ func main() {
pairs := flag.String("pairs", "", "comma-separated symbols")
startMS := flag.Int64("start-ms", 0, "inclusive start timestamp in milliseconds")
endMS := flag.Int64("end-ms", 0, "exclusive end timestamp in milliseconds")
timeframe := flag.String("timeframe", "8h", "bar timeframe (8h or 1d)")
outDir := flag.String("out-dir", "", "CSV output directory")
flag.Parse()
if *configPath == "" || *dataDir == "" || *pairs == "" || *outDir == "" || *startMS <= 0 || *endMS <= *startMS {
if (*timeframe != "8h" && *timeframe != "1d") || *configPath == "" || *dataDir == "" || *pairs == "" || *outDir == "" || *startMS <= 0 || *endMS <= *startMS {
flag.Usage()
os.Exit(2)
}
args := &config.CmdArgs{
Configs: config.ArrString{*configPath},
DataDir: *dataDir,
NoDefault: true,
RawPairs: *pairs,
TimeStart: strconv.FormatInt(*startMS, 10),
TimeEnd: strconv.FormatInt(*endMS, 10),
LogLevel: "error",
Configs: config.ArrString{*configPath},
DataDir: *dataDir,
NoDefault: true,
RawPairs: *pairs,
TimeStart: strconv.FormatInt(*startMS, 10),
TimeEnd: strconv.FormatInt(*endMS, 10),
LogLevel: "error",
}
if err := biz.SetupComs(args); err != nil {
fail(err)
@@ -58,7 +59,7 @@ func main() {
if err != nil {
fail(err)
}
_, rows, err := orm.GetSeries(exs, "8h", *startMS, *endMS, 0, false)
_, rows, err := orm.GetSeries(exs, *timeframe, *startMS, *endMS, 0, false)
if err != nil {
fail(err)
}