@backtest-kit/cli 7.8.0 → 8.0.0
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/README.md +1484 -1484
- package/build/index.cjs +163 -163
- package/build/index.mjs +163 -163
- package/config/notification.config.mjs +13 -13
- package/config/symbol.config.mjs +460 -460
- package/package.json +125 -125
- package/template/average-buy.mustache +22 -22
- package/template/breakeven.mustache +21 -21
- package/template/cancel-scheduled.mustache +14 -14
- package/template/cancelled.mustache +21 -21
- package/template/close-pending.mustache +16 -16
- package/template/closed.mustache +23 -23
- package/template/opened.mustache +22 -22
- package/template/partial-loss.mustache +22 -22
- package/template/partial-profit.mustache +22 -22
- package/template/project/config/symbol.config.ts +460 -460
- package/template/project/package.mustache +28 -28
- package/template/risk.mustache +19 -19
- package/template/scheduled.mustache +22 -22
- package/template/signal-close.mustache +22 -22
- package/template/signal-info.mustache +20 -20
- package/template/signal-open.mustache +22 -22
- package/template/source/CLAUDE.md +160 -160
- package/template/trailing-stop.mustache +21 -21
- package/template/trailing-take.mustache +21 -21
package/build/index.cjs
CHANGED
|
@@ -455,10 +455,10 @@ const ALLOWED_EXTENSIONS = [
|
|
|
455
455
|
const DISALLOWED_PATHS = [
|
|
456
456
|
"node_modules",
|
|
457
457
|
"@backtest-kit",
|
|
458
|
-
"build/index.mjs",
|
|
459
|
-
"build/index.js",
|
|
460
|
-
"build\\index.mjs",
|
|
461
|
-
"build\\index.js",
|
|
458
|
+
"cli/build/index.mjs",
|
|
459
|
+
"cli/build/index.js",
|
|
460
|
+
"cli\\build\\index.mjs",
|
|
461
|
+
"cli\\build\\index.js",
|
|
462
462
|
];
|
|
463
463
|
const getArgs = functoolsKit.singleshot(() => {
|
|
464
464
|
const { values, positionals } = util.parseArgs({
|
|
@@ -3001,10 +3001,10 @@ init();
|
|
|
3001
3001
|
|
|
3002
3002
|
const MODES = ["backtest", "walker", "paper", "live", "pine", "editor", "dump", "pnldebug", "flush", "init", "help", "version"];
|
|
3003
3003
|
const ENTRY_PATH$1 = "./node_modules/@backtest-kit/cli/build/index.mjs";
|
|
3004
|
-
const HELP_TEXT$1 = `
|
|
3005
|
-
Example:
|
|
3006
|
-
|
|
3007
|
-
node ${ENTRY_PATH$1} --help
|
|
3004
|
+
const HELP_TEXT$1 = `
|
|
3005
|
+
Example:
|
|
3006
|
+
|
|
3007
|
+
node ${ENTRY_PATH$1} --help
|
|
3008
3008
|
`.trimStart();
|
|
3009
3009
|
const main$e = async () => {
|
|
3010
3010
|
if (!getEntry((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)))) {
|
|
@@ -3014,7 +3014,7 @@ const main$e = async () => {
|
|
|
3014
3014
|
if (MODES.some((mode) => values[mode])) {
|
|
3015
3015
|
return;
|
|
3016
3016
|
}
|
|
3017
|
-
process.stdout.write(`@backtest-kit/cli ${"
|
|
3017
|
+
process.stdout.write(`@backtest-kit/cli ${"8.0.0"}\n`);
|
|
3018
3018
|
process.stdout.write("\n");
|
|
3019
3019
|
process.stdout.write(`Run with --help to see available commands.\n`);
|
|
3020
3020
|
process.stdout.write("\n");
|
|
@@ -3632,158 +3632,158 @@ const main$2 = async () => {
|
|
|
3632
3632
|
main$2();
|
|
3633
3633
|
|
|
3634
3634
|
const ENTRY_PATH = "./node_modules/@backtest-kit/cli/build/index.mjs";
|
|
3635
|
-
const HELP_TEXT = `
|
|
3636
|
-
Usage:
|
|
3637
|
-
node index.mjs --<mode> [flags] [entry-point]
|
|
3638
|
-
|
|
3639
|
-
Modes:
|
|
3640
|
-
|
|
3641
|
-
--backtest <entry> Run strategy against historical candle data
|
|
3642
|
-
--walker <entry...> Run Walker A/B strategy comparison across multiple strategies
|
|
3643
|
-
--paper <entry> Paper trading (live prices, no real orders)
|
|
3644
|
-
--live <entry> Live trading with real orders
|
|
3645
|
-
--pine <entry> Execute a local .pine indicator file
|
|
3646
|
-
--editor Open the Pine Script visual editor in the browser
|
|
3647
|
-
--dump Fetch and save raw OHLCV candles
|
|
3648
|
-
--pnldebug Simulate PnL per minute for a given entry price and direction
|
|
3649
|
-
--flush <entry...> Delete report/log/markdown/agent folders from strategy dump dir
|
|
3650
|
-
--init Scaffold a new project in the current directory
|
|
3651
|
-
--help Print this help message
|
|
3652
|
-
|
|
3653
|
-
Backtest flags:
|
|
3654
|
-
|
|
3655
|
-
--symbol <string> Trading pair (default: BTCUSDT)
|
|
3656
|
-
--strategy <string> Strategy name from addStrategySchema (default: first registered)
|
|
3657
|
-
--exchange <string> Exchange name from addExchangeSchema (default: first registered)
|
|
3658
|
-
--frame <string> Frame name from addFrameSchema (default: first registered)
|
|
3659
|
-
--cacheInterval <string> Comma-separated intervals to pre-cache (default: "1m, 15m, 30m, 4h")
|
|
3660
|
-
--noCache Skip candle cache warming before the run
|
|
3661
|
-
--noFlush Skip removing report/log/markdown/agent folders before backtest run
|
|
3662
|
-
--verbose Log every candle fetch to stdout
|
|
3663
|
-
--ui Start web dashboard at http://localhost:60050
|
|
3664
|
-
--telegram Send trade notifications to Telegram
|
|
3665
|
-
|
|
3666
|
-
Walker flags (--walker):
|
|
3667
|
-
|
|
3668
|
-
--symbol <string> Trading pair (default: BTCUSDT)
|
|
3669
|
-
--cacheInterval <string> Comma-separated intervals to pre-cache (default: "1m, 15m, 30m, 4h")
|
|
3670
|
-
--noCache Skip candle cache warming before the run
|
|
3671
|
-
--noFlush Skip removing report/log/markdown/agent folders before walker run
|
|
3672
|
-
--verbose Log every candle fetch to stdout
|
|
3673
|
-
--output <string> Output file base name (default: walker_{SYMBOL}_{TIMESTAMP})
|
|
3674
|
-
--json Save results as JSON to ./dump/<output>.json
|
|
3675
|
-
--markdown Save report as Markdown to ./dump/<output>.md
|
|
3676
|
-
|
|
3677
|
-
Each positional argument is a strategy entry point. All strategy files are loaded without
|
|
3678
|
-
changing process.cwd() — .env is read from the working directory only.
|
|
3679
|
-
addWalkerSchema is called automatically using the registered exchange and frame.
|
|
3680
|
-
After comparison completes the report is printed to stdout (or saved if --json/--markdown).
|
|
3681
|
-
|
|
3682
|
-
Module file ./modules/walker.module is loaded automatically if it exists.
|
|
3683
|
-
|
|
3684
|
-
Paper / Live flags:
|
|
3685
|
-
|
|
3686
|
-
--symbol <string> Trading pair (default: BTCUSDT)
|
|
3687
|
-
--strategy <string> Strategy name (default: first registered)
|
|
3688
|
-
--exchange <string> Exchange name (default: first registered)
|
|
3689
|
-
--verbose Log every candle fetch to stdout
|
|
3690
|
-
--ui Start web dashboard
|
|
3691
|
-
--telegram Send Telegram notifications
|
|
3692
|
-
|
|
3693
|
-
PineScript flags (--pine):
|
|
3694
|
-
|
|
3695
|
-
--symbol <string> Trading pair (default: BTCUSDT)
|
|
3696
|
-
--timeframe <string> Candle interval (default: 15m)
|
|
3697
|
-
--limit <string> Number of candles to fetch (default: 250)
|
|
3698
|
-
--when <string> End date — ISO 8601 or Unix ms (default: now)
|
|
3699
|
-
--exchange <string> Exchange name (default: first registered)
|
|
3700
|
-
--output <string> Output file base name without extension
|
|
3701
|
-
--json Save output as JSON array to <pine-dir>/dump/<output>.json
|
|
3702
|
-
--jsonl Save output as JSONL to <pine-dir>/dump/<output>.jsonl
|
|
3703
|
-
--markdown Save output as Markdown table to <pine-dir>/dump/<output>.md
|
|
3704
|
-
|
|
3705
|
-
Only plot() calls with display=display.data_window produce output columns.
|
|
3706
|
-
Module file ./modules/pine.module is loaded automatically if it exists.
|
|
3707
|
-
|
|
3708
|
-
Candle dump flags (--dump):
|
|
3709
|
-
|
|
3710
|
-
--symbol <string> Trading pair (default: BTCUSDT)
|
|
3711
|
-
--timeframe <string> Candle interval (default: 15m)
|
|
3712
|
-
--limit <string> Number of candles (default: 250)
|
|
3713
|
-
--when <string> End date — ISO 8601 or Unix ms (default: now)
|
|
3714
|
-
--exchange <string> Exchange name (default: first registered)
|
|
3715
|
-
--output <string> Output file base name (default: {SYMBOL}_{LIMIT}_{TIMEFRAME}_{TIMESTAMP})
|
|
3716
|
-
--json Save as JSON array to ./dump/<output>.json
|
|
3717
|
-
--jsonl Save as JSONL to ./dump/<output>.jsonl
|
|
3718
|
-
|
|
3719
|
-
Module file ./modules/dump.module is loaded automatically if it exists.
|
|
3720
|
-
|
|
3721
|
-
PnL debug flags (--pnldebug):
|
|
3722
|
-
|
|
3723
|
-
--symbol <string> Trading pair (default: BTCUSDT)
|
|
3724
|
-
--priceopen <number> Entry price (required)
|
|
3725
|
-
--direction <string> Position direction: long or short (default: long)
|
|
3726
|
-
--when <string> Start timestamp — ISO 8601 or Unix ms (default: now)
|
|
3727
|
-
--minutes <string> Number of 1m candles to simulate (default: 60)
|
|
3728
|
-
--exchange <string> Exchange name (default: first registered)
|
|
3729
|
-
--output <string> Output file base name (default: {SYMBOL}_{DIRECTION}_{PRICEOPEN}_{TIMESTAMP})
|
|
3730
|
-
--json Save as JSON array to ./dump/<output>.json
|
|
3731
|
-
--jsonl Save as JSONL to ./dump/<output>.jsonl
|
|
3732
|
-
--markdown Save as Markdown table to ./dump/<output>.md
|
|
3733
|
-
|
|
3734
|
-
Module file ./modules/pnldebug.module is loaded automatically if it exists.
|
|
3735
|
-
|
|
3736
|
-
Flush flags (--flush):
|
|
3737
|
-
|
|
3738
|
-
One or more positional entry points. For each entry point the following
|
|
3739
|
-
subdirectories are removed from <entry-dir>/dump/:
|
|
3740
|
-
|
|
3741
|
-
report log markdown agent
|
|
3742
|
-
|
|
3743
|
-
Init flags (--init):
|
|
3744
|
-
|
|
3745
|
-
--output <string> Target directory name (default: backtest-kit-project)
|
|
3746
|
-
|
|
3747
|
-
Scaffolds a project and runs scripts/fetch_docs.mjs to download library docs.
|
|
3748
|
-
|
|
3749
|
-
Module hooks (loaded automatically by each mode):
|
|
3750
|
-
|
|
3751
|
-
modules/backtest.module --backtest Broker adapter for backtest
|
|
3752
|
-
modules/walker.module --walker Broker adapter for walker comparison
|
|
3753
|
-
modules/paper.module --paper Broker adapter for paper trading
|
|
3754
|
-
modules/live.module --live Broker adapter for live trading
|
|
3755
|
-
modules/pine.module --pine Exchange schema for PineScript runs
|
|
3756
|
-
modules/editor.module --editor Exchange schema for the visual Pine editor
|
|
3757
|
-
modules/dump.module --dump Exchange schema for candle dumps
|
|
3758
|
-
modules/pnldebug.module --pnldebug Exchange schema for PnL debug runs
|
|
3759
|
-
|
|
3760
|
-
--flush has no associated module. It only removes dump subdirectories.
|
|
3761
|
-
|
|
3762
|
-
Extensions .ts, .mjs, .cjs are tried automatically. Missing module = soft warning.
|
|
3763
|
-
|
|
3764
|
-
Environment variables:
|
|
3765
|
-
|
|
3766
|
-
CC_TELEGRAM_TOKEN Telegram bot token (required for --telegram)
|
|
3767
|
-
CC_TELEGRAM_CHANNEL Telegram channel or chat ID (required for --telegram)
|
|
3768
|
-
CC_WWWROOT_HOST UI server bind address (default: 0.0.0.0)
|
|
3769
|
-
CC_WWWROOT_PORT UI server port (default: 60050)
|
|
3770
|
-
|
|
3771
|
-
Examples:
|
|
3772
|
-
|
|
3773
|
-
node ${ENTRY_PATH} --backtest ./content/feb_2026.strategy.ts
|
|
3774
|
-
node ${ENTRY_PATH} --backtest --symbol BTCUSDT --noCache --noFlush --ui ./content/feb_2026.strategy.ts
|
|
3775
|
-
node ${ENTRY_PATH} --walker ./content/feb_2026_v1.strategy.ts ./content/feb_2026_v2.strategy.ts ./content/feb_2026_v3.strategy.ts
|
|
3776
|
-
node ${ENTRY_PATH} --walker --symbol BTCUSDT --noCache --noFlush --markdown ./content/feb_2026_v1.ts ./content/feb_2026_v2.ts
|
|
3777
|
-
node ${ENTRY_PATH} --paper --symbol ETHUSDT ./content/feb_2026.strategy.ts
|
|
3778
|
-
node ${ENTRY_PATH} --live --ui --telegram ./content/feb_2026.strategy.ts
|
|
3779
|
-
node ${ENTRY_PATH} --pine ./math/feb_2026.pine --timeframe 15m --limit 500 --jsonl
|
|
3780
|
-
node ${ENTRY_PATH} --editor
|
|
3781
|
-
node ${ENTRY_PATH} --dump --symbol BTCUSDT --timeframe 15m --limit 500 --jsonl
|
|
3782
|
-
node ${ENTRY_PATH} --pnldebug --symbol BTCUSDT --priceopen 64069.50 --direction short --when "2025-02-25" --minutes 120
|
|
3783
|
-
node ${ENTRY_PATH} --pnldebug --priceopen 67956.73 --direction long --when 1772064000000 --minutes 60 --markdown
|
|
3784
|
-
node ${ENTRY_PATH} --flush ./content/feb_2026.strategy/feb_2026.strategy.ts
|
|
3785
|
-
node ${ENTRY_PATH} --flush ./content/feb_2026.strategy/feb_2026.strategy.ts ./content/feb_2026.strategy/feb_2026.test.ts
|
|
3786
|
-
node ${ENTRY_PATH} --init --output my-trading-bot
|
|
3635
|
+
const HELP_TEXT = `
|
|
3636
|
+
Usage:
|
|
3637
|
+
node index.mjs --<mode> [flags] [entry-point]
|
|
3638
|
+
|
|
3639
|
+
Modes:
|
|
3640
|
+
|
|
3641
|
+
--backtest <entry> Run strategy against historical candle data
|
|
3642
|
+
--walker <entry...> Run Walker A/B strategy comparison across multiple strategies
|
|
3643
|
+
--paper <entry> Paper trading (live prices, no real orders)
|
|
3644
|
+
--live <entry> Live trading with real orders
|
|
3645
|
+
--pine <entry> Execute a local .pine indicator file
|
|
3646
|
+
--editor Open the Pine Script visual editor in the browser
|
|
3647
|
+
--dump Fetch and save raw OHLCV candles
|
|
3648
|
+
--pnldebug Simulate PnL per minute for a given entry price and direction
|
|
3649
|
+
--flush <entry...> Delete report/log/markdown/agent folders from strategy dump dir
|
|
3650
|
+
--init Scaffold a new project in the current directory
|
|
3651
|
+
--help Print this help message
|
|
3652
|
+
|
|
3653
|
+
Backtest flags:
|
|
3654
|
+
|
|
3655
|
+
--symbol <string> Trading pair (default: BTCUSDT)
|
|
3656
|
+
--strategy <string> Strategy name from addStrategySchema (default: first registered)
|
|
3657
|
+
--exchange <string> Exchange name from addExchangeSchema (default: first registered)
|
|
3658
|
+
--frame <string> Frame name from addFrameSchema (default: first registered)
|
|
3659
|
+
--cacheInterval <string> Comma-separated intervals to pre-cache (default: "1m, 15m, 30m, 4h")
|
|
3660
|
+
--noCache Skip candle cache warming before the run
|
|
3661
|
+
--noFlush Skip removing report/log/markdown/agent folders before backtest run
|
|
3662
|
+
--verbose Log every candle fetch to stdout
|
|
3663
|
+
--ui Start web dashboard at http://localhost:60050
|
|
3664
|
+
--telegram Send trade notifications to Telegram
|
|
3665
|
+
|
|
3666
|
+
Walker flags (--walker):
|
|
3667
|
+
|
|
3668
|
+
--symbol <string> Trading pair (default: BTCUSDT)
|
|
3669
|
+
--cacheInterval <string> Comma-separated intervals to pre-cache (default: "1m, 15m, 30m, 4h")
|
|
3670
|
+
--noCache Skip candle cache warming before the run
|
|
3671
|
+
--noFlush Skip removing report/log/markdown/agent folders before walker run
|
|
3672
|
+
--verbose Log every candle fetch to stdout
|
|
3673
|
+
--output <string> Output file base name (default: walker_{SYMBOL}_{TIMESTAMP})
|
|
3674
|
+
--json Save results as JSON to ./dump/<output>.json
|
|
3675
|
+
--markdown Save report as Markdown to ./dump/<output>.md
|
|
3676
|
+
|
|
3677
|
+
Each positional argument is a strategy entry point. All strategy files are loaded without
|
|
3678
|
+
changing process.cwd() — .env is read from the working directory only.
|
|
3679
|
+
addWalkerSchema is called automatically using the registered exchange and frame.
|
|
3680
|
+
After comparison completes the report is printed to stdout (or saved if --json/--markdown).
|
|
3681
|
+
|
|
3682
|
+
Module file ./modules/walker.module is loaded automatically if it exists.
|
|
3683
|
+
|
|
3684
|
+
Paper / Live flags:
|
|
3685
|
+
|
|
3686
|
+
--symbol <string> Trading pair (default: BTCUSDT)
|
|
3687
|
+
--strategy <string> Strategy name (default: first registered)
|
|
3688
|
+
--exchange <string> Exchange name (default: first registered)
|
|
3689
|
+
--verbose Log every candle fetch to stdout
|
|
3690
|
+
--ui Start web dashboard
|
|
3691
|
+
--telegram Send Telegram notifications
|
|
3692
|
+
|
|
3693
|
+
PineScript flags (--pine):
|
|
3694
|
+
|
|
3695
|
+
--symbol <string> Trading pair (default: BTCUSDT)
|
|
3696
|
+
--timeframe <string> Candle interval (default: 15m)
|
|
3697
|
+
--limit <string> Number of candles to fetch (default: 250)
|
|
3698
|
+
--when <string> End date — ISO 8601 or Unix ms (default: now)
|
|
3699
|
+
--exchange <string> Exchange name (default: first registered)
|
|
3700
|
+
--output <string> Output file base name without extension
|
|
3701
|
+
--json Save output as JSON array to <pine-dir>/dump/<output>.json
|
|
3702
|
+
--jsonl Save output as JSONL to <pine-dir>/dump/<output>.jsonl
|
|
3703
|
+
--markdown Save output as Markdown table to <pine-dir>/dump/<output>.md
|
|
3704
|
+
|
|
3705
|
+
Only plot() calls with display=display.data_window produce output columns.
|
|
3706
|
+
Module file ./modules/pine.module is loaded automatically if it exists.
|
|
3707
|
+
|
|
3708
|
+
Candle dump flags (--dump):
|
|
3709
|
+
|
|
3710
|
+
--symbol <string> Trading pair (default: BTCUSDT)
|
|
3711
|
+
--timeframe <string> Candle interval (default: 15m)
|
|
3712
|
+
--limit <string> Number of candles (default: 250)
|
|
3713
|
+
--when <string> End date — ISO 8601 or Unix ms (default: now)
|
|
3714
|
+
--exchange <string> Exchange name (default: first registered)
|
|
3715
|
+
--output <string> Output file base name (default: {SYMBOL}_{LIMIT}_{TIMEFRAME}_{TIMESTAMP})
|
|
3716
|
+
--json Save as JSON array to ./dump/<output>.json
|
|
3717
|
+
--jsonl Save as JSONL to ./dump/<output>.jsonl
|
|
3718
|
+
|
|
3719
|
+
Module file ./modules/dump.module is loaded automatically if it exists.
|
|
3720
|
+
|
|
3721
|
+
PnL debug flags (--pnldebug):
|
|
3722
|
+
|
|
3723
|
+
--symbol <string> Trading pair (default: BTCUSDT)
|
|
3724
|
+
--priceopen <number> Entry price (required)
|
|
3725
|
+
--direction <string> Position direction: long or short (default: long)
|
|
3726
|
+
--when <string> Start timestamp — ISO 8601 or Unix ms (default: now)
|
|
3727
|
+
--minutes <string> Number of 1m candles to simulate (default: 60)
|
|
3728
|
+
--exchange <string> Exchange name (default: first registered)
|
|
3729
|
+
--output <string> Output file base name (default: {SYMBOL}_{DIRECTION}_{PRICEOPEN}_{TIMESTAMP})
|
|
3730
|
+
--json Save as JSON array to ./dump/<output>.json
|
|
3731
|
+
--jsonl Save as JSONL to ./dump/<output>.jsonl
|
|
3732
|
+
--markdown Save as Markdown table to ./dump/<output>.md
|
|
3733
|
+
|
|
3734
|
+
Module file ./modules/pnldebug.module is loaded automatically if it exists.
|
|
3735
|
+
|
|
3736
|
+
Flush flags (--flush):
|
|
3737
|
+
|
|
3738
|
+
One or more positional entry points. For each entry point the following
|
|
3739
|
+
subdirectories are removed from <entry-dir>/dump/:
|
|
3740
|
+
|
|
3741
|
+
report log markdown agent
|
|
3742
|
+
|
|
3743
|
+
Init flags (--init):
|
|
3744
|
+
|
|
3745
|
+
--output <string> Target directory name (default: backtest-kit-project)
|
|
3746
|
+
|
|
3747
|
+
Scaffolds a project and runs scripts/fetch_docs.mjs to download library docs.
|
|
3748
|
+
|
|
3749
|
+
Module hooks (loaded automatically by each mode):
|
|
3750
|
+
|
|
3751
|
+
modules/backtest.module --backtest Broker adapter for backtest
|
|
3752
|
+
modules/walker.module --walker Broker adapter for walker comparison
|
|
3753
|
+
modules/paper.module --paper Broker adapter for paper trading
|
|
3754
|
+
modules/live.module --live Broker adapter for live trading
|
|
3755
|
+
modules/pine.module --pine Exchange schema for PineScript runs
|
|
3756
|
+
modules/editor.module --editor Exchange schema for the visual Pine editor
|
|
3757
|
+
modules/dump.module --dump Exchange schema for candle dumps
|
|
3758
|
+
modules/pnldebug.module --pnldebug Exchange schema for PnL debug runs
|
|
3759
|
+
|
|
3760
|
+
--flush has no associated module. It only removes dump subdirectories.
|
|
3761
|
+
|
|
3762
|
+
Extensions .ts, .mjs, .cjs are tried automatically. Missing module = soft warning.
|
|
3763
|
+
|
|
3764
|
+
Environment variables:
|
|
3765
|
+
|
|
3766
|
+
CC_TELEGRAM_TOKEN Telegram bot token (required for --telegram)
|
|
3767
|
+
CC_TELEGRAM_CHANNEL Telegram channel or chat ID (required for --telegram)
|
|
3768
|
+
CC_WWWROOT_HOST UI server bind address (default: 0.0.0.0)
|
|
3769
|
+
CC_WWWROOT_PORT UI server port (default: 60050)
|
|
3770
|
+
|
|
3771
|
+
Examples:
|
|
3772
|
+
|
|
3773
|
+
node ${ENTRY_PATH} --backtest ./content/feb_2026.strategy.ts
|
|
3774
|
+
node ${ENTRY_PATH} --backtest --symbol BTCUSDT --noCache --noFlush --ui ./content/feb_2026.strategy.ts
|
|
3775
|
+
node ${ENTRY_PATH} --walker ./content/feb_2026_v1.strategy.ts ./content/feb_2026_v2.strategy.ts ./content/feb_2026_v3.strategy.ts
|
|
3776
|
+
node ${ENTRY_PATH} --walker --symbol BTCUSDT --noCache --noFlush --markdown ./content/feb_2026_v1.ts ./content/feb_2026_v2.ts
|
|
3777
|
+
node ${ENTRY_PATH} --paper --symbol ETHUSDT ./content/feb_2026.strategy.ts
|
|
3778
|
+
node ${ENTRY_PATH} --live --ui --telegram ./content/feb_2026.strategy.ts
|
|
3779
|
+
node ${ENTRY_PATH} --pine ./math/feb_2026.pine --timeframe 15m --limit 500 --jsonl
|
|
3780
|
+
node ${ENTRY_PATH} --editor
|
|
3781
|
+
node ${ENTRY_PATH} --dump --symbol BTCUSDT --timeframe 15m --limit 500 --jsonl
|
|
3782
|
+
node ${ENTRY_PATH} --pnldebug --symbol BTCUSDT --priceopen 64069.50 --direction short --when "2025-02-25" --minutes 120
|
|
3783
|
+
node ${ENTRY_PATH} --pnldebug --priceopen 67956.73 --direction long --when 1772064000000 --minutes 60 --markdown
|
|
3784
|
+
node ${ENTRY_PATH} --flush ./content/feb_2026.strategy/feb_2026.strategy.ts
|
|
3785
|
+
node ${ENTRY_PATH} --flush ./content/feb_2026.strategy/feb_2026.strategy.ts ./content/feb_2026.strategy/feb_2026.test.ts
|
|
3786
|
+
node ${ENTRY_PATH} --init --output my-trading-bot
|
|
3787
3787
|
`.trimStart();
|
|
3788
3788
|
const main$1 = async () => {
|
|
3789
3789
|
if (!getEntry((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('index.cjs', document.baseURI).href)))) {
|
|
@@ -3793,7 +3793,7 @@ const main$1 = async () => {
|
|
|
3793
3793
|
if (!values.help) {
|
|
3794
3794
|
return;
|
|
3795
3795
|
}
|
|
3796
|
-
process.stdout.write(`@backtest-kit/cli ${"
|
|
3796
|
+
process.stdout.write(`@backtest-kit/cli ${"8.0.0"}\n\n`);
|
|
3797
3797
|
process.stdout.write(HELP_TEXT);
|
|
3798
3798
|
process.exit(0);
|
|
3799
3799
|
};
|
|
@@ -3807,7 +3807,7 @@ const main = async () => {
|
|
|
3807
3807
|
if (!values.version) {
|
|
3808
3808
|
return;
|
|
3809
3809
|
}
|
|
3810
|
-
process.stdout.write(`@backtest-kit/cli ${"
|
|
3810
|
+
process.stdout.write(`@backtest-kit/cli ${"8.0.0"}\n`);
|
|
3811
3811
|
process.exit(0);
|
|
3812
3812
|
};
|
|
3813
3813
|
main();
|