@backtest-kit/cli 6.0.0 → 6.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.cjs
CHANGED
|
@@ -2499,6 +2499,19 @@ const main$3 = async () => {
|
|
|
2499
2499
|
process.exit(0);
|
|
2500
2500
|
return;
|
|
2501
2501
|
}
|
|
2502
|
+
if (values.markdown) {
|
|
2503
|
+
const header = `| open | high | low | close | volume | timestamp |\n| --- | --- | --- | --- | --- | --- |`;
|
|
2504
|
+
const rows = candles.map((c) => `| ${c.open} | ${c.high} | ${c.low} | ${c.close} | ${c.volume} | ${new Date(c.timestamp).toISOString()} |`);
|
|
2505
|
+
const md = [header, ...rows].join("\n");
|
|
2506
|
+
{
|
|
2507
|
+
const filePath = path.resolve(dumpDir, `${dumpName}.md`);
|
|
2508
|
+
await fs$1.mkdir(dumpDir, { recursive: true });
|
|
2509
|
+
await fs$1.writeFile(filePath, md, "utf-8");
|
|
2510
|
+
console.log(`Saved: ${filePath}`);
|
|
2511
|
+
}
|
|
2512
|
+
process.exit(0);
|
|
2513
|
+
return;
|
|
2514
|
+
}
|
|
2502
2515
|
console.log(JSON.stringify(candles, null, 2));
|
|
2503
2516
|
process.exit(0);
|
|
2504
2517
|
};
|
package/build/index.mjs
CHANGED
|
@@ -2470,6 +2470,19 @@ const main$3 = async () => {
|
|
|
2470
2470
|
process.exit(0);
|
|
2471
2471
|
return;
|
|
2472
2472
|
}
|
|
2473
|
+
if (values.markdown) {
|
|
2474
|
+
const header = `| open | high | low | close | volume | timestamp |\n| --- | --- | --- | --- | --- | --- |`;
|
|
2475
|
+
const rows = candles.map((c) => `| ${c.open} | ${c.high} | ${c.low} | ${c.close} | ${c.volume} | ${new Date(c.timestamp).toISOString()} |`);
|
|
2476
|
+
const md = [header, ...rows].join("\n");
|
|
2477
|
+
{
|
|
2478
|
+
const filePath = resolve(dumpDir, `${dumpName}.md`);
|
|
2479
|
+
await mkdir(dumpDir, { recursive: true });
|
|
2480
|
+
await writeFile(filePath, md, "utf-8");
|
|
2481
|
+
console.log(`Saved: ${filePath}`);
|
|
2482
|
+
}
|
|
2483
|
+
process.exit(0);
|
|
2484
|
+
return;
|
|
2485
|
+
}
|
|
2473
2486
|
console.log(JSON.stringify(candles, null, 2));
|
|
2474
2487
|
process.exit(0);
|
|
2475
2488
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backtest-kit/cli",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "Zero-boilerplate CLI runner for backtest-kit strategies. Run backtests, paper trading, and live bots with candle cache warming, web dashboard, and Telegram notifications — no setup code required.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Petr Tripolsky",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
## Guide
|
|
2
2
|
|
|
3
|
+
> Instead of brutforce the input values of pine indicator like dummy monkey do I AM FORCING YOU to research the internet, the candles dump for searching of profitable concept applicable to current market state. If attempt failed and you don't known exactly why try another one. Only minimal adjust when you already see the result is allowed in this context and this improve it
|
|
4
|
+
|
|
3
5
|
### How to Write a Strategy
|
|
4
6
|
|
|
5
7
|
**What NOT to do**
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"license": "ISC",
|
|
13
13
|
"type": "commonjs",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@backtest-kit/cli": "^
|
|
16
|
-
"@backtest-kit/graph": "^
|
|
17
|
-
"@backtest-kit/pinets": "^
|
|
18
|
-
"@backtest-kit/ui": "^
|
|
15
|
+
"@backtest-kit/cli": "^6.0.0",
|
|
16
|
+
"@backtest-kit/graph": "^6.0.0",
|
|
17
|
+
"@backtest-kit/pinets": "^6.0.0",
|
|
18
|
+
"@backtest-kit/ui": "^6.0.0",
|
|
19
19
|
"agent-swarm-kit": "^1.3.0",
|
|
20
|
-
"backtest-kit": "^
|
|
20
|
+
"backtest-kit": "^6.0.0",
|
|
21
21
|
"functools-kit": "^1.0.95",
|
|
22
22
|
"garch": "^1.2.3",
|
|
23
23
|
"get-moment-stamp": "^1.1.2",
|
|
@@ -44,15 +44,24 @@ const OUT_DIR = path.resolve("./docs/lib");
|
|
|
44
44
|
|
|
45
45
|
fs.mkdirSync(OUT_DIR, { recursive: true });
|
|
46
46
|
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
const main = async () => {
|
|
48
|
+
for (const lib of LIBRARY_LIST) {
|
|
49
|
+
const res = await fetch(lib.readme);
|
|
50
|
+
if (!res.ok) {
|
|
51
|
+
console.error(`Failed to fetch ${lib.name}: ${res.status} ${res.statusText}`);
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
const text = await res.text();
|
|
55
|
+
const fileName = lib.name.replace(/\//g, "__") + ".md";
|
|
56
|
+
const outPath = path.join(OUT_DIR, fileName);
|
|
57
|
+
fs.writeFileSync(outPath, text, "utf-8");
|
|
58
|
+
console.log(`Saved ${lib.name} -> ${outPath}`);
|
|
52
59
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
try {
|
|
63
|
+
await main();
|
|
64
|
+
} catch {
|
|
65
|
+
console.log("Failed to fetch docs")
|
|
58
66
|
}
|
|
67
|
+
|