dexterm-cli 0.1.7 → 0.2.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/dist/packages/agents/src/spectator.js +3 -1
- package/dist/packages/agents/src/tiers.js +9 -0
- package/dist/packages/agents/src/tools.js +10 -5
- package/dist/packages/autotrade/assets/limits.schema.json +569 -0
- package/dist/packages/autotrade/examples/executor/README.md +70 -0
- package/dist/packages/autotrade/examples/executor/jsonl-tail-executor.mjs +57 -0
- package/dist/packages/autotrade/examples/executor/kit.mjs +144 -0
- package/dist/packages/autotrade/examples/executor/signal-cmd-executor.mjs +25 -0
- package/dist/packages/autotrade/examples/executor/telegram-bot-recipe.md +47 -0
- package/dist/packages/autotrade/examples/executor/webhook-executor.mjs +47 -0
- package/dist/packages/autotrade/src/backtest.js +2 -1
- package/dist/packages/autotrade/src/chat/config.js +4 -2
- package/dist/packages/autotrade/src/chat/control.js +1 -0
- package/dist/packages/autotrade/src/chat/notify.js +16 -6
- package/dist/packages/autotrade/src/chat/secrets.js +25 -18
- package/dist/packages/autotrade/src/chat/service.js +3 -0
- package/dist/packages/autotrade/src/engine.js +16 -2
- package/dist/packages/autotrade/src/executor-health.js +217 -0
- package/dist/packages/autotrade/src/fleet.js +3 -0
- package/dist/packages/autotrade/src/forward.js +355 -0
- package/dist/packages/autotrade/src/index.js +19 -0
- package/dist/packages/autotrade/src/journey.js +477 -0
- package/dist/packages/autotrade/src/limits.js +682 -0
- package/dist/packages/autotrade/src/outbox.js +394 -0
- package/dist/packages/autotrade/src/paper-limits.js +87 -0
- package/dist/packages/autotrade/src/real-mode.js +688 -0
- package/dist/packages/autotrade/src/receipts.js +330 -0
- package/dist/packages/autotrade/src/report.js +168 -0
- package/dist/packages/autotrade/src/runner.js +62 -11
- package/dist/packages/autotrade/src/service-guard.js +125 -0
- package/dist/packages/autotrade/src/service-install.js +213 -0
- package/dist/packages/autotrade/src/service-recover.js +232 -0
- package/dist/packages/autotrade/src/service.js +289 -0
- package/dist/packages/autotrade/src/signal-channels.js +312 -0
- package/dist/packages/autotrade/src/signal.js +196 -0
- package/dist/packages/autotrade/src/strategy.js +3 -1
- package/dist/packages/autotrade/src/trade-ledger.js +2 -2
- package/dist/packages/cli/src/analyst/backend.js +3 -2
- package/dist/packages/cli/src/analyst/codex.js +3 -2
- package/dist/packages/cli/src/app-help-gen.js +14 -2
- package/dist/packages/cli/src/autotrade-cmd/audit.js +19 -2
- package/dist/packages/cli/src/autotrade-cmd/backtest.js +21 -4
- package/dist/packages/cli/src/autotrade-cmd/executor.js +91 -0
- package/dist/packages/cli/src/autotrade-cmd/fleet.js +8 -4
- package/dist/packages/cli/src/autotrade-cmd/forward.js +283 -0
- package/dist/packages/cli/src/autotrade-cmd/journey.js +208 -0
- package/dist/packages/cli/src/autotrade-cmd/limits.js +393 -0
- package/dist/packages/cli/src/autotrade-cmd/receipt.js +63 -0
- package/dist/packages/cli/src/autotrade-cmd/report.js +79 -0
- package/dist/packages/cli/src/autotrade-cmd/run.js +257 -13
- package/dist/packages/cli/src/autotrade-cmd/service.js +873 -0
- package/dist/packages/cli/src/autotrade-cmd/signal.js +824 -0
- package/dist/packages/cli/src/autotrade-cmd.js +50 -4
- package/dist/packages/cli/src/ledger-cmd.js +4 -2
- package/dist/packages/cli/src/pnl-card.js +4 -0
- package/dist/packages/cli/src/screens/autotrade-journey.js +134 -0
- package/dist/packages/cli/src/screens/autotrade-keys.js +13 -0
- package/dist/packages/cli/src/screens/autotrade-screen.js +57 -6
- package/dist/packages/cli/src/screens/autotrade-ui.js +17 -7
- package/dist/packages/cli/src/screens/autotrade-worker.js +4 -2
- package/dist/packages/cli/src/telegram-cmd.js +4 -1
- package/dist/packages/cli/src/version.js +1 -1
- package/dist/packages/data/src/trade/ledger/schema.js +1 -1
- package/dist/packages/mcp/assets/kb/app-help/autotrade-executor-kit.md +44 -0
- package/dist/packages/mcp/assets/kb/app-help/autotrade-journey.md +46 -0
- package/dist/packages/mcp/assets/kb/app-help/autotrade-limits.md +48 -0
- package/dist/packages/mcp/assets/kb/app-help/autotrade-real-signal.md +45 -0
- package/dist/packages/mcp/assets/kb/app-help/live-trading.md +1 -1
- package/dist/packages/mcp/assets/kb/app-help/screen-autotrade.md +12 -0
- package/dist/packages/mcp/assets/kb/app-help/trade-ledger.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-change-a-strategy-by-chat.md +3 -1
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-on-the-q-screen.md +1 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-running-it-all-day.md +2 -2
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-stopping-it.md +2 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-the-always-on-service.md +57 -0
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-what-it-is-paper-self-directed.md +9 -2
- package/dist/packages/mcp/assets/kb/docs/docs-autotrade-what-it-will-not-do.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-1-ask-for-a-strategy.md +27 -0
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-2-backtest-it-held-out-split.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-3-forward-test-it-on-live-data.md +44 -0
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-4-promote-it-to-always-on-paper.md +36 -0
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-5-real-only-if-you-choose.md +36 -0
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-the-ladder.md +39 -0
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-the-report.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-what-the-analyst-knows.md +30 -0
- package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat.md +24 -0
- package/dist/packages/mcp/assets/kb/docs/docs-getting-started-install.md +3 -3
- package/dist/packages/mcp/assets/kb/docs/docs-getting-started-requirements.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-going-real-executor-health.md +38 -0
- package/dist/packages/mcp/assets/kb/docs/docs-going-real-paper-vs-real.md +33 -0
- package/dist/packages/mcp/assets/kb/docs/docs-going-real-the-digest.md +36 -0
- package/dist/packages/mcp/assets/kb/docs/docs-going-real-the-executor-kit.md +48 -0
- package/dist/packages/mcp/assets/kb/docs/docs-going-real-the-whole-path.md +37 -0
- package/dist/packages/mcp/assets/kb/docs/docs-going-real-what-dexterm-does-and-never-does.md +44 -0
- package/dist/packages/mcp/assets/kb/docs/docs-going-real-your-limits.md +77 -0
- package/dist/packages/mcp/assets/kb/docs/docs-going-real.md +24 -0
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-changed-in-0-1-7.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-real-mode-your-strategy-s-trades-to-your.md +31 -0
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-the-short-version.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-using-a-trading-bot-with-dexterm.md +0 -2
- package/dist/packages/mcp/assets/kb/docs/docs-live-trading-what-dexterm-does-not-do.md +1 -1
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode-receipts-what-your-executor-did.md +42 -0
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode-safety.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode-set-it-up.md +47 -0
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode-the-channels.md +42 -0
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode-the-signal.md +48 -0
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode-what-it-is.md +35 -0
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode-what-it-will-not-do.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode-where-you-see-it.md +34 -0
- package/dist/packages/mcp/assets/kb/docs/docs-real-mode.md +27 -0
- package/dist/packages/mcp/assets/kb/docs/docs-telegram-what-it-is.md +1 -1
- package/dist/packages/mcp/assets/kb/entries/autotrade.md +4 -2
- package/dist/packages/mcp/src/autotrade-tools.js +168 -5
- package/dist/packages/mcp/src/engine/restrictions.js +3 -3
- package/dist/packages/mcp/src/index.js +1 -1
- package/dist/packages/mcp/src/ledger-tools.js +155 -7
- package/dist/packages/mcp/src/server.js +21 -10
- package/dist/packages/tui/src/keymap.js +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: autotrade-journey
|
|
3
|
+
title: Build a strategy by chat, back-test it, forward-test it, then promote it (paper, then real)
|
|
4
|
+
kind: app-help
|
|
5
|
+
screen: all
|
|
6
|
+
feature: autotrade-journey
|
|
7
|
+
tags:
|
|
8
|
+
- app-help
|
|
9
|
+
- autotrade
|
|
10
|
+
- strategy
|
|
11
|
+
- build
|
|
12
|
+
- chat
|
|
13
|
+
- journey
|
|
14
|
+
- ladder
|
|
15
|
+
- backtest
|
|
16
|
+
- held-out
|
|
17
|
+
- forward
|
|
18
|
+
- test
|
|
19
|
+
- promote
|
|
20
|
+
- promotion
|
|
21
|
+
- always-on
|
|
22
|
+
- real
|
|
23
|
+
- evidence
|
|
24
|
+
commands:
|
|
25
|
+
- autotrade
|
|
26
|
+
tools:
|
|
27
|
+
- strategy_journey
|
|
28
|
+
- strategy_forward_start
|
|
29
|
+
- strategy_forward_stop
|
|
30
|
+
- strategy_forward_report
|
|
31
|
+
- strategy_promote_propose
|
|
32
|
+
confidence: high
|
|
33
|
+
owner: maintainers
|
|
34
|
+
origin: app-help-generated
|
|
35
|
+
reviewed_by: generated@2026-10-16
|
|
36
|
+
generated_from: dexterm/app keymap + overlay + mcp tools + cli (task-1413)
|
|
37
|
+
sources:
|
|
38
|
+
- packages/tui/src/keymap.ts
|
|
39
|
+
- packages/cli/src/main.ts
|
|
40
|
+
- packages/mcp/src/server.ts
|
|
41
|
+
date: 2026-10-16
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
A strategy climbs one ladder, one rung at a time: draft → backtested → forward-tested → always-on (paper) → real. Each rung needs evidence measured on that strategy's exact rules; any rule change starts it again (a rename or arming keeps it). Ask the analyst to build one ("build me a strategy that buys young pairs on a 5-minute push and takes profit at 2x"): it proposes a copy of a preset with changes (strategy_propose_new), you apply it on the Q screen. BACKTESTED: `dexterm autotrade backtest <id>` or strategy_backtest runs it on recorded history and on each half of the held-out split (the newest 30% of coins); verdict rule 6 allows gain wording only with at least 20 trades in both halves and a held-out net above 0. FORWARD-TESTED: `dexterm autotrade forward start <id> --hours 24` (or `--trades N`, or strategy_forward_start from the chat) runs the same version on the LIVE tape, on paper, with its own bankroll and run file, in the background next to the always-on service; `forward status`, `forward stop` and `forward report` (the forward numbers next to the backtest: trades, win rate with its interval, net, drawdown, rug rate, fill cost drift, and a plain line when a sample is too small). Only a test that ran its whole window on live data counts. ALWAYS-ON: the analyst can propose it (strategy_promote_propose), you apply it with `dexterm autotrade promote apply <pp-id>` (y on your own terminal) or on the Q screen journey view (`J`, then `y`); it joins autotrade.json and the always-on service runs it on paper. REAL: you set your own limits (`dexterm autotrade limits set`; `signal caps set` sets four of them), then `dexterm autotrade promote <id> --to real` hands over to `signal arm` (evidence panel, typed phrase with a one-time code). No tool or model can apply a promotion, skip a rung, set a cap, pick a bankroll or arm real mode. `dexterm autotrade journey <id>` shows where a strategy stands. Paper by default; not financial advice.
|
|
45
|
+
|
|
46
|
+
CLI: `dexterm autotrade`.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: autotrade-limits
|
|
3
|
+
title: Set your own real-mode limits: per trade, per day, open positions, loss stops, the breaker (dexterm autotrade limits)
|
|
4
|
+
kind: app-help
|
|
5
|
+
screen: all
|
|
6
|
+
feature: autotrade-limits
|
|
7
|
+
tags:
|
|
8
|
+
- app-help
|
|
9
|
+
- limits
|
|
10
|
+
- limit
|
|
11
|
+
- caps
|
|
12
|
+
- cap
|
|
13
|
+
- size
|
|
14
|
+
- sizing
|
|
15
|
+
- per
|
|
16
|
+
- trade
|
|
17
|
+
- daily
|
|
18
|
+
- loss
|
|
19
|
+
- drawdown
|
|
20
|
+
- breaker
|
|
21
|
+
- streak
|
|
22
|
+
- exposure
|
|
23
|
+
- slippage
|
|
24
|
+
- ttl
|
|
25
|
+
- rate
|
|
26
|
+
- raise
|
|
27
|
+
- lower
|
|
28
|
+
- scope
|
|
29
|
+
commands:
|
|
30
|
+
- autotrade
|
|
31
|
+
tools:
|
|
32
|
+
- trading_limits
|
|
33
|
+
- limits_propose
|
|
34
|
+
confidence: high
|
|
35
|
+
owner: maintainers
|
|
36
|
+
origin: app-help-generated
|
|
37
|
+
reviewed_by: generated@2026-10-16
|
|
38
|
+
generated_from: dexterm/app keymap + overlay + mcp tools + cli (task-1413)
|
|
39
|
+
sources:
|
|
40
|
+
- packages/tui/src/keymap.ts
|
|
41
|
+
- packages/cli/src/main.ts
|
|
42
|
+
- packages/mcp/src/server.ts
|
|
43
|
+
date: 2026-10-16
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
Every limit real mode enforces is yours to set, in one file (`~/.dexterm/autotrade/real/limits.json`, schema `dexterm-limits/1`): per trade as SOL or as % of the book (the smaller wins), SOL and buys per day, open positions, exposure, min and max position, per coin per day, a daily loss stop, a drawdown breaker, a loss-streak pause, max hold time, the evidence floor for arming (`minForwardTrades`: closed paper trades in a completed forward test, placeholder 10), min liquidity and market cap, max slippage and price impact, the signal TTL, a buy rate limit, an optional sell rate (sells are never capped unless you set one) and how long a silent executor may stay silent. `dexterm autotrade limits show [--strategy ID] [--account ID]` lists what is in force and where each number comes from; `limits set perTradeSol=0.5 dailyLossSol=0.3` (or `--scope real|paper|strategy:ID|account:ID`) changes them: a global number replaces the placeholder default, every other scope can only tighten, and the stricter always wins. Paper runs ignore them unless you add a `paper` scope; then a single paper run (not `run --all`) obeys them on its own state (a replay then needs `--sol-usd N`). Daily counters cover the whole home (every strategy and account), so a strategy or account number can only stop buys sooner. Lowering is immediate, even for a running real run; raising shows the old -> new diff and needs the typed phrase on your own terminal, and applies from the next run. `limits diff`, `limits accept` (a hand-edited file), `limits reset`, `limits breaker reset` (typed) and `limits explain` do the rest. The defaults (0.25 SOL a trade, 1 SOL a day, 20 buys, 3 open, stop at -0.5 SOL a day) are placeholders: arming asks for your own numbers first. The analyst can read and explain them (`trading_limits`) and propose a change as a diff card (`limits_propose`); it can never apply one.
|
|
47
|
+
|
|
48
|
+
CLI: `dexterm autotrade`.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: autotrade-real-signal
|
|
3
|
+
title: Real mode: send a strategy's trades to your own executor as LIVE TRADE FIRE signals (dexterm autotrade signal)
|
|
4
|
+
kind: app-help
|
|
5
|
+
screen: all
|
|
6
|
+
feature: autotrade-real-signal
|
|
7
|
+
tags:
|
|
8
|
+
- app-help
|
|
9
|
+
- real
|
|
10
|
+
- mode
|
|
11
|
+
- live
|
|
12
|
+
- trade
|
|
13
|
+
- fire
|
|
14
|
+
- signal
|
|
15
|
+
- signals
|
|
16
|
+
- executor
|
|
17
|
+
- webhook
|
|
18
|
+
- hook
|
|
19
|
+
- jsonl
|
|
20
|
+
- receipt
|
|
21
|
+
- receipts
|
|
22
|
+
- arm
|
|
23
|
+
- caps
|
|
24
|
+
- kill
|
|
25
|
+
- outbox
|
|
26
|
+
- nonce
|
|
27
|
+
commands:
|
|
28
|
+
- autotrade
|
|
29
|
+
tools:
|
|
30
|
+
- trade_fire_feed
|
|
31
|
+
confidence: high
|
|
32
|
+
owner: maintainers
|
|
33
|
+
origin: app-help-generated
|
|
34
|
+
reviewed_by: generated@2026-10-16
|
|
35
|
+
generated_from: dexterm/app keymap + overlay + mcp tools + cli (task-1413)
|
|
36
|
+
sources:
|
|
37
|
+
- packages/tui/src/keymap.ts
|
|
38
|
+
- packages/cli/src/main.ts
|
|
39
|
+
- packages/mcp/src/server.ts
|
|
40
|
+
date: 2026-10-16
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
Real mode runs a strategy exactly like paper (the same clamp, exits, monitor and run file) and sends every buy and sell it fills, first, as a LIVE TRADE FIRE signal (`dexterm-trade-fire/1`: buy or sell, mint, symbol, size in SOL and % of book, the sell fraction and exit reason, strategy, run, account, an always-growing nonce, an idempotency id and an expiry) to YOUR executor: a Telegram trading bot of your choice or any script. dexterm holds no key and signs nothing. Set channels with `dexterm autotrade signal channels --webhook URL | --signal-cmd '["/abs/path"]' | --jsonl on | --mcp on | --telegram on` (they live in connectors.json next to the Telegram setup; a bot cannot read another bot, so the Telegram copy alone is not enough), a webhook HMAC secret with `signal secret generate --out FILE`, hard caps with `signal caps set` (raising needs a typed confirmation), then arm on your own terminal with `dexterm autotrade signal arm <id>` (evidence panel + a typed phrase with a one-time code; any later edit disarms; below the evidence floor, a completed forward test with your `minForwardTrades` closed paper trades and a backtest of these exact rules, or past a missing rung of the ladder, it refuses unless you first type a separate OVERRIDE phrase, which is journaled) and run `dexterm autotrade run <id> --real` (live data only, in the foreground: in 0.2.0 the always-on service runs paper strategies only). Delivery is at least once from a restart-safe outbox, in nonce order, retried until acked or expired; the executor dedupes by nonce, ignores expired signals and acts only on its own account. Every run ends with a `halted` signal that lists the positions still open; the run's last lines and the Telegram copy name them too. Open positions are carried to the next real run of the same strategy and account, whose exits keep firing; while no real run is running NO signal goes out, sells included, so manage them in your executor. Positions stay unconfirmed until `dexterm autotrade receipt <nonce> executed|rejected|failed` (data only). `signal kill` stops every signal; `signal status`, `signal tail`, `receipt list` and `autotrade audit` show the outbox, receipts and drift; agents can read the MCP feed with trade_fire_feed. No model, tool or chat tap can arm real mode, raise a cap or lift the kill switch. Experimental; not financial advice.
|
|
44
|
+
|
|
45
|
+
CLI: `dexterm autotrade`.
|
|
@@ -33,6 +33,6 @@ sources:
|
|
|
33
33
|
date: 2026-10-16
|
|
34
34
|
---
|
|
35
35
|
|
|
36
|
-
dexterm never holds a key and never signs or sends a transaction: there is no trading wallet, no signer and no live order in dexterm. Live trading happens in a Telegram trading bot of your choice, which holds its own wallet; you act in that bot. dexterm's part is the Telegram connector to your OWN bot (`dexterm telegram setup`): alerts, signals and run control for your paper runs. dexterm
|
|
36
|
+
dexterm never holds a key and never signs or sends a transaction: there is no trading wallet, no signer and no live order in dexterm. Live trading happens in a Telegram trading bot of your choice, which holds its own wallet; you act in that bot. dexterm's part is the Telegram connector to your OWN bot (`dexterm telegram setup`): alerts, signals and run control for your paper runs. dexterm does not place orders in a trading bot for you: in real mode (0.2.0, experimental) a strategy you armed on your own terminal sends a signal for each trade to an executor you run, and your executor places the order by its own rules (`dexterm autotrade signal`, https://dexterm.xyz/docs/real-mode/). Paper trading (the ticket, paper accounts, paper autotrade) is local. `dexterm wallet link` keeps a Phantom public key for display only. Not financial advice. Full docs: https://dexterm.xyz/docs/live-trading/
|
|
37
37
|
|
|
38
38
|
CLI: `dexterm telegram`, `dexterm wallet`, `dexterm live`.
|
|
@@ -79,6 +79,10 @@ keys:
|
|
|
79
79
|
- !
|
|
80
80
|
- f
|
|
81
81
|
- o
|
|
82
|
+
- J
|
|
83
|
+
- F
|
|
84
|
+
- X
|
|
85
|
+
- A
|
|
82
86
|
actions:
|
|
83
87
|
- quit
|
|
84
88
|
- screen.screener
|
|
@@ -141,6 +145,10 @@ actions:
|
|
|
141
145
|
- autotrade.pause
|
|
142
146
|
- autotrade.flatten
|
|
143
147
|
- autotrade.proposal
|
|
148
|
+
- autotrade.journey
|
|
149
|
+
- autotrade.forward
|
|
150
|
+
- autotrade.forwardstop
|
|
151
|
+
- autotrade.promote
|
|
144
152
|
tools:
|
|
145
153
|
- strategy_list
|
|
146
154
|
- autotrade_status
|
|
@@ -214,4 +222,8 @@ Keys on this screen:
|
|
|
214
222
|
`p` — pause new entries
|
|
215
223
|
`f` — flatten (confirm)
|
|
216
224
|
`o` — review chat proposal
|
|
225
|
+
`J` — journey (ladder)
|
|
226
|
+
`F` — forward test (paper)
|
|
227
|
+
`X` — stop forward test
|
|
228
|
+
`A` — review promotion
|
|
217
229
|
`?` — this help
|
|
@@ -49,6 +49,6 @@ sources:
|
|
|
49
49
|
date: 2026-10-16
|
|
50
50
|
---
|
|
51
51
|
|
|
52
|
-
`dexterm ledger trades` lists every round trip dexterm booked, from the paper ticket, the agent paper desk and autotrade runs, newest first: strategy version, the exit profile and entry reason it was opened with (marked * when not declared with the fill), the exit reason, size and % of book, entry and exit market cap, P/L, hold and MFE/MAE. `positions` shows the open ones. `summary` gives the win rate with its 95% interval, P/L, profit factor, drawdown and rug rate by profile, exit reason, strategy, source and mode; `equity` the realized equity curve; `compare` strategy versions side by side (for strategies run in parallel); `export csv|json|parquet-lite [--out FILE]`; `card <tradeId>` a PnL card from a row. Filters: --source, --mode paper|devnet|live, --strategy id[@version], --profile, --exit, --mint, --run, --days, --status. Reads never write; `dexterm ledger sync` appends to ~/.dexterm/ledger/trades.jsonl (sha256-chained) and `dexterm ledger verify` names the first edited line. Agents read the same rows with the read-only ledger_* tools; `trading_status` and `telegram_status` show settings and state, never a key, address, exact balance, bot token or chat id. A backtest an agent asks for (backtest_request) only runs when you run it: `dexterm autotrade requests`. PAPER rows are simulated; filter by --mode before comparing. Not financial advice. Full docs: https://dexterm.xyz/docs/paper-trading/#the-trade-ledger
|
|
52
|
+
`dexterm ledger trades` lists every round trip dexterm booked, from the paper ticket, the agent paper desk and autotrade runs, newest first: strategy version, the exit profile and entry reason it was opened with (marked * when not declared with the fill), the exit reason, size and % of book, entry and exit market cap, P/L, hold and MFE/MAE. `positions` shows the open ones. `summary` gives the win rate with its 95% interval, P/L, profit factor, drawdown and rug rate by profile, exit reason, strategy, source and mode; `equity` the realized equity curve; `compare` strategy versions side by side (for strategies run in parallel); `export csv|json|parquet-lite [--out FILE]`; `card <tradeId>` a PnL card from a row. Filters: --source, --mode paper|devnet|live|real (real = a real-mode run: dexterm's model of the trades it signalled), --strategy id[@version], --profile, --exit, --mint, --run, --days, --status. Reads never write; `dexterm ledger sync` appends to ~/.dexterm/ledger/trades.jsonl (sha256-chained) and `dexterm ledger verify` names the first edited line. Agents read the same rows with the read-only ledger_* tools; `trading_status` and `telegram_status` show settings and state, never a key, address, exact balance, bot token or chat id. A backtest an agent asks for (backtest_request) only runs when you run it: `dexterm autotrade requests`. PAPER rows are simulated; filter by --mode before comparing. Not financial advice. Full docs: https://dexterm.xyz/docs/paper-trading/#the-trade-ledger
|
|
53
53
|
|
|
54
54
|
CLI: `dexterm ledger`.
|
|
@@ -42,8 +42,10 @@ Applying checks the proposal again from scratch: if the strategy changed since i
|
|
|
42
42
|
|
|
43
43
|
**What the analyst can never change.** The mode (so it can never switch a strategy to live), the book, the daily session budget and the exit-liquidity floor are yours only: a proposal that touches them, directly or by replacing the section around them, is refused before it reaches you. It cannot apply a proposal or skip the second key either. A shipped preset is read-only, so the analyst proposes a copy under a new id instead, always on paper.
|
|
44
44
|
|
|
45
|
-
**A backtest next to it.** The analyst can backtest a proposal next to the current version on the same window of your recorded history (up to 14 days).
|
|
45
|
+
**A backtest next to it.** The analyst can backtest a proposal next to the current version on the same window of your recorded history (up to 14 days). A proposal's backtest saves nothing (a backtest of a strategy itself is recorded as its evidence for the journey (https://dexterm.xyz/docs/build-a-strategy-by-chat)), runs one at a time and is rate-limited, and it carries the limits above (https://dexterm.xyz/docs/autotrade#backtests-and-their-limits): read the number of trades before the totals.
|
|
46
46
|
|
|
47
47
|
An agent you connect over MCP (`dexterm mcp`) gets the same seven tools under the same rules: `strategy_list`, `strategy_get`, `strategy_validate`, `strategy_propose_edit`, `strategy_propose_new`, `strategy_backtest` and `autotrade_status`. An AI scan (https://dexterm.xyz/docs/scan) session cannot propose at all.
|
|
48
48
|
|
|
49
|
+
**From a chat to an always-on strategy.** Building a whole strategy by chat, backtesting it with the held-out split, forward-testing it on live data on paper and promoting it one rung at a time (always-on, then real, each applied only by you) has its own page: build a strategy by chat (https://dexterm.xyz/docs/build-a-strategy-by-chat).
|
|
50
|
+
|
|
49
51
|
Paper only. Not financial advice.
|
|
@@ -33,5 +33,6 @@ Press `Q` on any screen for AUTOTRADE, paper only. `tab` moves between its views
|
|
|
33
33
|
- **Compare**: `c` on two strategies in the list shows them side by side with the fields that differ first, and `b` backtests both on the same window of recorded history.
|
|
34
34
|
- **Backtest**: `b` backtests the selected strategy on the last 14 days of your recorded history and shows the report: trades, win rate with its interval, net, drawdown, the tail numbers, an equity line, results by exit rule, profile and trigger, the size clamps that fired, the refused entries and the limits box. `w` runs a sweep around the default exit profile's own settings with the held-out check described below; its verdict is printed as is. Both run in the background, so the app stays live.
|
|
35
35
|
- **Runner**: a running paper runner's heartbeat, any halt, its candidates, sessions, positions and the last lines of its run file; a runner whose heartbeat is more than 30 seconds old shows as stale. `!` stops it, `p` pauses and resumes new entries, and `f` then `y` flattens it (see Stopping it (https://dexterm.xyz/docs/autotrade#stopping-it)).
|
|
36
|
+
- **Journey**: `J` on a strategy shows its ladder (draft, backtested, forward-tested, always-on, real) with the evidence for each rung, the forward test running or its report next to the backtest, and any promotion waiting for you. `b` backtests it with the held-out split, `F` starts a 24-hour paper forward test on live data and `X` stops it, `A` then `y` applies a pending always-on promotion. Real is never applied from a key (see build a strategy by chat (https://dexterm.xyz/docs/build-a-strategy-by-chat)).
|
|
36
37
|
|
|
37
38
|
Nothing on this screen can switch a strategy to live, arm a mandate or touch a wallet or a key: the mode is not an editable field, an import is always paper, and a strategy that says live is refused for backtests.
|
|
@@ -27,5 +27,5 @@ date: 2026-10-16
|
|
|
27
27
|
`dexterm autotrade run` is a headless process: start it in a terminal (or a terminal multiplexer such as `tmux`) and it works until you stop it (https://dexterm.xyz/docs/autotrade#stopping-it), `--max-minutes` runs out, or you press Ctrl+C. A two-hour run is measured under What it costs (https://dexterm.xyz/docs/autotrade#what-it-costs-claude-usage-per-session). Screening uses no model at all, so a runner that is only watching costs no Claude usage; usage starts when a coin matches.
|
|
28
28
|
|
|
29
29
|
- **One runner per machine.** A second `run` is refused while one is working. A lock left by a runner that crashed is taken over once its process is gone.
|
|
30
|
-
- **Each run has its own paper book.** It starts from the strategy's `bankroll`, and a new run starts a fresh one. A run that ends with positions still open says how many on its last line and in its run file; nothing carries them into the next run.
|
|
31
|
-
- **
|
|
30
|
+
- **Each run has its own paper book.** It starts from the strategy's `bankroll`, and a new run starts a fresh one. A run that ends with positions still open says how many on its last line and in its run file; nothing carries them into the next run (the always-on service (https://dexterm.xyz/docs/autotrade#the-always-on-service) carries them over after a crash).
|
|
31
|
+
- **In a terminal, leave it open.** A runner started by hand stops when its terminal session ends, and the computer's sleep pauses it. The always-on service below starts it with your login instead.
|
|
@@ -32,4 +32,6 @@ Three switches, from soft to hard. You use them; your agent cannot. A session ha
|
|
|
32
32
|
|
|
33
33
|
`p` on the `Q` screen pauses new entries, and `p` again resumes them; open positions keep their exits either way.
|
|
34
34
|
|
|
35
|
+
Under the always-on service (https://dexterm.xyz/docs/autotrade#the-always-on-service), a stop or flatten from any of these (or `dexterm autotrade service stop`) also keeps the service stopped until `dexterm autotrade service start`; a pause does not stop it.
|
|
36
|
+
|
|
35
37
|
With several strategies at once (https://dexterm.xyz/docs/autotrade#several-strategies-at-once), these switches act on every strategy, and `--strategy ID` on `stop`, `flatten`, `pause` and `resume` acts on one. An agent you connect over MCP can stop or pause one strategy you listed there, never all of them and never the panic.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-autotrade-the-always-on-service
|
|
3
|
+
title: Autotrade (paper) › Running it all day › The always-on service
|
|
4
|
+
kind: docs
|
|
5
|
+
page: autotrade
|
|
6
|
+
page_title: Autotrade (paper)
|
|
7
|
+
heading: The always-on service
|
|
8
|
+
anchor: the-always-on-service
|
|
9
|
+
url: https://dexterm.xyz/docs/autotrade#the-always-on-service
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- autotrade
|
|
13
|
+
- always-on
|
|
14
|
+
- service
|
|
15
|
+
- running
|
|
16
|
+
- all
|
|
17
|
+
- day
|
|
18
|
+
- paper
|
|
19
|
+
confidence: high
|
|
20
|
+
owner: maintainers
|
|
21
|
+
origin: docs-generated
|
|
22
|
+
reviewed_by: generated@2026-10-16
|
|
23
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
24
|
+
sources:
|
|
25
|
+
- site/content/docs/autotrade.md
|
|
26
|
+
date: 2026-10-16
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
Install it once and the strategies in your `autotrade.json` (https://dexterm.xyz/docs/autotrade#the-autotradejson-file) keep running: they start when you log in, start again after a crash, never run twice, stop at once on any kill switch, and tell you when they cannot run.
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
dexterm autotrade service install --dry-run # shows exactly what it would write; writes nothing
|
|
33
|
+
dexterm autotrade service install --load # writes it and loads it
|
|
34
|
+
dexterm autotrade service status # running?, guard, crashes, each strategy
|
|
35
|
+
dexterm autotrade service stop # no new entries now; exits keep running; stays stopped
|
|
36
|
+
dexterm autotrade service start # start again (lifts a stop)
|
|
37
|
+
dexterm autotrade service logs # the end of its log
|
|
38
|
+
dexterm autotrade service uninstall # stop, unload, remove exactly what install wrote
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
- **What install writes.** One small job that runs `dexterm autotrade service ensure` every minute and at login: a LaunchAgent in `~/Library/LaunchAgents/` on macOS (no `KeepAlive`), a systemd user timer in `~/.config/systemd/user/` on Linux, a scheduled task on Windows. Install prints every file in full and checks that it parses before writing anything; `--dry-run` stops there, and without `--load` nothing is loaded. It runs while you are logged in (on Linux, `loginctl enable-linger` is your choice for after logout). Each `DEXTERM_HOME` gets its own job, so a test home never replaces your real one.
|
|
42
|
+
- **What a tick does.** `ensure` does nothing while the service's heartbeat is fresh, and otherwise starts it. The service runs `dexterm autotrade run --all --paper` for every strategy you listed, with the same lock, run files, `Q` screen and switches as a run you start by hand. Flags for it go in `~/.dexterm/autotrade/service.json` (`{ "schema": "dexterm-autotrade-service-config/1", "runArgs": ["--model", "sonnet"] }`; only `--model`, `--sol-usd`, `--config`, `--replay`, `--ms-per-tick`, `--max-minutes` and `--stub`).
|
|
43
|
+
- **After a crash or a restart.** A crash costs at most a minute. The new run checks the crashed run's file, takes over the paper positions it left open (their stops, take-profits, trails and maximum hold keep running from the original entry), and never buys a coin the crashed run already took. An order that had not filled never happened, and it is never sent again.
|
|
44
|
+
- **A crash loop gives up.** Restarts after a crash wait 0, 0, 1, 2 and 4 minutes; the sixth crash within an hour leaves the service down with one notification. `dexterm autotrade service status --clear` lets it start again once you have read the log.
|
|
45
|
+
- **A stop stays a stop.** `service stop`, `dexterm autotrade stop`, `!` on the `Q` screen, `/kill` from your Telegram bot, `dexterm wallet panic`, or simply creating the file `~/.dexterm/autotrade/service/STOP`: new entries halt on the next step, open positions keep their exits until they close (`service stop --flatten --yes` sells them), and the service stays stopped until `dexterm autotrade service start`. Logging out or shutting down is not a stop: it starts again at your next login.
|
|
46
|
+
- **The guard.** Every 10 seconds the service checks the machine and the data. These pause new entries until they clear, and never the exits on what you hold:
|
|
47
|
+
|
|
48
|
+
| guard | when |
|
|
49
|
+
|---|---|
|
|
50
|
+
| disk low | free space under `runner.json` `disk.minFreeGb` (5 GB by default); it lifts 1 GB above that |
|
|
51
|
+
| load high | the 1-minute load above `load.pauseAboveLoad1m` for `load.sustainSec`; it lifts below `load.resumeBelowLoad1m` |
|
|
52
|
+
| busy process | a `load.busyProcs` pattern is running (a render, a test suite) |
|
|
53
|
+
| stale data | no strategy has seen a market tick for 5 minutes |
|
|
54
|
+
|
|
55
|
+
It also tells you, without pausing anything, when the usage guard or a day cap holds new sessions back, when a strategy halts itself on its loss limits, when the strategies' heartbeat goes quiet, and when your market history has stopped growing (`dexterm record install` sets that up; the service trades without it, your backtests need it).
|
|
56
|
+
- **Your bot.** When your Telegram bot (https://dexterm.xyz/docs/telegram) is set up, the service runs it: every strategy's alerts, `/status`, `/pause` and `/kill`, plus a message when the service is down, gives up after a crash loop, a guard trips, a strategy halts on its caps, or the data goes stale.
|
|
57
|
+
- **Light on the machine.** It runs at low priority (nice 10, low IO priority), with a 512 MB memory cap (a leak ends in a restart, not a slow machine), and its logs in `~/.dexterm/autotrade/logs/` are capped at a few MB each.
|
|
@@ -22,7 +22,7 @@ sources:
|
|
|
22
22
|
date: 2026-10-16
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
-
Autotrade (paper) is a strategy file plus an engine that replays it. You write the rules: which coins count as candidates, how a position is sized, how it is exited, and how much loss is allowed. The engine applies exactly those rules, and every size is clamped by them. It runs on **paper** by default: there is no key, wallet or signer anywhere in a strategy, and a paper run never signs or sends anything. A strategy
|
|
25
|
+
Autotrade (paper) is a strategy file plus an engine that replays it. You write the rules: which coins count as candidates, how a position is sized, how it is exited, and how much loss is allowed. The engine applies exactly those rules, and every size is clamped by them. It runs on **paper** by default: there is no key, wallet or signer anywhere in a strategy, and a paper run never signs or sends anything. A strategy you switch to **real** yourself, on your own terminal, runs the same way and also sends each trade to your own executor as a signal: see real mode (https://dexterm.xyz/docs/real-mode) (experimental; dexterm still holds no key and signs nothing). A strategy that says `"mode": "live"` (the removed local signer) validates with a warning and never runs.
|
|
26
26
|
|
|
27
27
|
It is self-directed: your strategies, on your machine, with your own recorded history. Nobody runs a strategy for you, and a preset is an example, not a recommendation.
|
|
28
28
|
|
|
@@ -38,6 +38,13 @@ What ships today, covered below:
|
|
|
38
38
|
- What it costs (https://dexterm.xyz/docs/autotrade#what-it-costs-claude-usage-per-session): the Claude usage of a session, measured.
|
|
39
39
|
- What it will not do (https://dexterm.xyz/docs/autotrade#what-it-will-not-do): live money, copy-trading automation, managing anyone else's money.
|
|
40
40
|
|
|
41
|
+
The rest of the automated trading suite has its own pages:
|
|
42
|
+
|
|
43
|
+
- Build a strategy by chat (https://dexterm.xyz/docs/build-a-strategy-by-chat): the ladder from a chat proposal to a backtest, a paper forward test on live data, always on and, only if you choose, real, one rung at a time on evidence.
|
|
44
|
+
- The always-on service (https://dexterm.xyz/docs/autotrade#the-always-on-service): your listed strategies keep running from login and come back after a crash.
|
|
45
|
+
- Real mode (https://dexterm.xyz/docs/real-mode) (experimental): a strategy you arm on your own terminal sends each trade as a signal to your own executor; dexterm never holds a key.
|
|
46
|
+
- Going real, safely (https://dexterm.xyz/docs/going-real): your own limits for every number, the executor kit, executor health and the digest.
|
|
47
|
+
|
|
41
48
|
On your phone: your own Telegram bot (https://dexterm.xyz/docs/telegram) sends the entries, exits, PnL cards and halts, takes `/pause` and `/kill`, and can make every entry wait for your tap (`entry.decide: "agent+approve"`).
|
|
42
49
|
|
|
43
|
-
Still to come, documented here when it lands:
|
|
50
|
+
Still to come, documented here when it lands: the runner filling through the paper desk (https://dexterm.xyz/docs/autotrade#exits-and-wakes) with the exit monitor as its own process.
|
|
@@ -22,7 +22,7 @@ sources:
|
|
|
22
22
|
date: 2026-10-16
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
-
- **Live money.** A run never signs and never sends a transaction: `--live` and a strategy in live mode are refused, and the runner holds no key. Live trading happens in a Telegram trading bot of your choice, outside dexterm (see Live trading (https://dexterm.xyz/docs/live-trading)).
|
|
25
|
+
- **Live money.** A run never signs and never sends a transaction: `--live` and a strategy in live mode are refused, and the runner holds no key. Live trading happens in a Telegram trading bot (or script) of your choice, outside dexterm (see Live trading (https://dexterm.xyz/docs/live-trading)); in real mode (https://dexterm.xyz/docs/real-mode) dexterm sends that executor a signal for each trade and it decides.
|
|
26
26
|
- **Copy-trading automation.** It does not copy anyone's trades.
|
|
27
27
|
- **Managing anyone else's money.** It runs your strategies on your machine, with your own Claude login and your own paper book. Nobody runs a strategy for you: there are no hosted runners, no pooled accounts, no fee on its trades and no strategy marketplace.
|
|
28
28
|
- **Decide outside your rules.** Your agent chooses only inside the bounds you wrote. It cannot raise a size, block an exit, lift a stop or apply a strategy change; you apply a change with a key.
|
package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-1-ask-for-a-strategy.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-build-a-strategy-by-chat-1-ask-for-a-strategy
|
|
3
|
+
title: Build a strategy by chat › 1. Ask for a strategy
|
|
4
|
+
kind: docs
|
|
5
|
+
page: build-a-strategy-by-chat
|
|
6
|
+
page_title: Build a strategy by chat
|
|
7
|
+
heading: 1. Ask for a strategy
|
|
8
|
+
anchor: 1-ask-for-a-strategy
|
|
9
|
+
url: https://dexterm.xyz/docs/build-a-strategy-by-chat#1-ask-for-a-strategy
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- build-a-strategy-by-chat
|
|
13
|
+
- ask
|
|
14
|
+
- strategy
|
|
15
|
+
- build
|
|
16
|
+
- chat
|
|
17
|
+
confidence: high
|
|
18
|
+
owner: maintainers
|
|
19
|
+
origin: docs-generated
|
|
20
|
+
reviewed_by: generated@2026-10-16
|
|
21
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
22
|
+
sources:
|
|
23
|
+
- site/content/docs/build-a-strategy-by-chat.md
|
|
24
|
+
date: 2026-10-16
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
Open the analyst and say what you want, for example: "build me a strategy that buys young pairs on a 5-minute push, takes the cost back at 2x and lets the rest ride". The analyst works only through typed tools: it reads the presets, then **proposes** a new strategy (a copy of a preset with its changes) and any edits after that. Each proposal arrives on the `Q` screen as a card with the fields that change, the validation result and TIGHTER, NEUTRAL or LOOSER; `o` opens it, `y` applies it (a looser edit needs a second `y`), `n` dismisses it. Nothing exists until you apply it, and a new strategy always starts on paper. Your mode, bankroll, model budget and exit-liquidity floor stay yours: the analyst cannot change them. See changing a strategy by chat (https://dexterm.xyz/docs/autotrade#change-a-strategy-by-chat).
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-build-a-strategy-by-chat-2-backtest-it-held-out-split
|
|
3
|
+
title: Build a strategy by chat › 2. Backtest it (held-out split)
|
|
4
|
+
kind: docs
|
|
5
|
+
page: build-a-strategy-by-chat
|
|
6
|
+
page_title: Build a strategy by chat
|
|
7
|
+
heading: 2. Backtest it (held-out split)
|
|
8
|
+
anchor: 2-backtest-it-held-out-split
|
|
9
|
+
url: https://dexterm.xyz/docs/build-a-strategy-by-chat#2-backtest-it-held-out-split
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- build-a-strategy-by-chat
|
|
13
|
+
- backtest
|
|
14
|
+
- held-out
|
|
15
|
+
- split
|
|
16
|
+
- build
|
|
17
|
+
- strategy
|
|
18
|
+
- chat
|
|
19
|
+
confidence: high
|
|
20
|
+
owner: maintainers
|
|
21
|
+
origin: docs-generated
|
|
22
|
+
reviewed_by: generated@2026-10-16
|
|
23
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
24
|
+
sources:
|
|
25
|
+
- site/content/docs/build-a-strategy-by-chat.md
|
|
26
|
+
date: 2026-10-16
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
`dexterm autotrade backtest <id>` (or `b` on the `Q` screen's journey view, or asking the analyst, which calls `strategy_backtest`) runs the strategy on your recorded history, then runs it again on each half of a **held-out split**: the newest 30% of coins, which nothing was ever tuned on, against the rest. The result is recorded as the strategy's backtest evidence.
|
|
30
|
+
|
|
31
|
+
The evidence rule is strict: gain wording is allowed only with **at least 20 trades in both halves and a held-out net above 0**. Below that the report says "too few trades to claim anything", and the analyst is told to quote the trade counts and nothing more. A backtest is modelled fills on recorded snapshots, not a prediction; its data limits (https://dexterm.xyz/docs/autotrade#backtests-and-their-limits) are printed with it.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-build-a-strategy-by-chat-3-forward-test-it-on-live-data
|
|
3
|
+
title: Build a strategy by chat › 3. Forward-test it on live data (paper)
|
|
4
|
+
kind: docs
|
|
5
|
+
page: build-a-strategy-by-chat
|
|
6
|
+
page_title: Build a strategy by chat
|
|
7
|
+
heading: 3. Forward-test it on live data (paper)
|
|
8
|
+
anchor: 3-forward-test-it-on-live-data-paper
|
|
9
|
+
url: https://dexterm.xyz/docs/build-a-strategy-by-chat#3-forward-test-it-on-live-data-paper
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- build-a-strategy-by-chat
|
|
13
|
+
- forward-test
|
|
14
|
+
- live
|
|
15
|
+
- data
|
|
16
|
+
- paper
|
|
17
|
+
- build
|
|
18
|
+
- strategy
|
|
19
|
+
- chat
|
|
20
|
+
confidence: high
|
|
21
|
+
owner: maintainers
|
|
22
|
+
origin: docs-generated
|
|
23
|
+
reviewed_by: generated@2026-10-16
|
|
24
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
25
|
+
sources:
|
|
26
|
+
- site/content/docs/build-a-strategy-by-chat.md
|
|
27
|
+
date: 2026-10-16
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
A forward test runs the same version on the **live** tape, on paper, with its own bankroll and its own run file, for a window you choose:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
dexterm autotrade forward start <id> --hours 24 # or --trades 30, or both (whichever comes first)
|
|
34
|
+
dexterm autotrade forward status [<id>]
|
|
35
|
+
dexterm autotrade forward stop <id>
|
|
36
|
+
dexterm autotrade forward report <id> [--json]
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- It starts in the background and runs next to the always-on service (it does not take the runner's lock). `--foreground` keeps it in your terminal; `--bankroll-usd N` sets its paper bankroll (default: the strategy's own).
|
|
40
|
+
- The strategy is frozen at the version it started with. A forward test of a strategy in real mode runs its paper twin: it never sends a signal.
|
|
41
|
+
- At the end of its window it sells everything at the next tick (so its numbers are closed numbers), writes its report and records the result. The panic switch stops it like any run.
|
|
42
|
+
- The analyst can start and stop one too (`strategy_forward_start`, `strategy_forward_stop`), after a backtest, for at most 72 hours or 200 trades, with the strategy's own bankroll. On the `Q` screen's journey view, `F` starts a 24-hour test and `X` stops it.
|
|
43
|
+
- Only a test that ran its **whole window on live data** counts as the forward-tested rung. A test stopped early, run on a replay (`--replay` is a smoke run) or whose process died is shown, never counted.
|
|
44
|
+
- A strategy that needs a chat approval for every entry cannot be forward-tested: no tap reaches a forward test. Model sessions of an agent strategy run on your own engine within the strategy's budgets, as in any run.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-build-a-strategy-by-chat-4-promote-it-to-always-on-paper
|
|
3
|
+
title: Build a strategy by chat › 4. Promote it to always-on (paper)
|
|
4
|
+
kind: docs
|
|
5
|
+
page: build-a-strategy-by-chat
|
|
6
|
+
page_title: Build a strategy by chat
|
|
7
|
+
heading: 4. Promote it to always-on (paper)
|
|
8
|
+
anchor: 4-promote-it-to-always-on-paper
|
|
9
|
+
url: https://dexterm.xyz/docs/build-a-strategy-by-chat#4-promote-it-to-always-on-paper
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- build-a-strategy-by-chat
|
|
13
|
+
- promote
|
|
14
|
+
- always-on
|
|
15
|
+
- paper
|
|
16
|
+
- build
|
|
17
|
+
- strategy
|
|
18
|
+
- chat
|
|
19
|
+
confidence: high
|
|
20
|
+
owner: maintainers
|
|
21
|
+
origin: docs-generated
|
|
22
|
+
reviewed_by: generated@2026-10-16
|
|
23
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
24
|
+
sources:
|
|
25
|
+
- site/content/docs/build-a-strategy-by-chat.md
|
|
26
|
+
date: 2026-10-16
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
When the forward test is done, the analyst can **propose** the promotion (`strategy_promote_propose`) or you can ask for it yourself:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
dexterm autotrade promote <id> --to always-on
|
|
33
|
+
dexterm autotrade promote list | show <pp-id> | apply <pp-id> | dismiss <pp-id>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Every promotion shows an evidence card first: the ladder, the backtest, the forward test and the comparison. Applying it needs your `y` on your own terminal (a pipe, a flag or an agent cannot give it), or `A` then `y` on the `Q` screen's journey view. The strategy then joins `autotrade.json` as a paper member, next to your other entries, and the always-on service runs it from its next start (`dexterm autotrade service status`).
|
package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-5-real-only-if-you-choose.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-build-a-strategy-by-chat-5-real-only-if-you-choose
|
|
3
|
+
title: Build a strategy by chat › 5. Real, only if you choose
|
|
4
|
+
kind: docs
|
|
5
|
+
page: build-a-strategy-by-chat
|
|
6
|
+
page_title: Build a strategy by chat
|
|
7
|
+
heading: 5. Real, only if you choose
|
|
8
|
+
anchor: 5-real-only-if-you-choose
|
|
9
|
+
url: https://dexterm.xyz/docs/build-a-strategy-by-chat#5-real-only-if-you-choose
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- build-a-strategy-by-chat
|
|
13
|
+
- real
|
|
14
|
+
- only
|
|
15
|
+
- choose
|
|
16
|
+
- build
|
|
17
|
+
- strategy
|
|
18
|
+
- chat
|
|
19
|
+
confidence: high
|
|
20
|
+
owner: maintainers
|
|
21
|
+
origin: docs-generated
|
|
22
|
+
reviewed_by: generated@2026-10-16
|
|
23
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
24
|
+
sources:
|
|
25
|
+
- site/content/docs/build-a-strategy-by-chat.md
|
|
26
|
+
date: 2026-10-16
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
Real mode sends each of the strategy's trades as a LIVE TRADE FIRE signal to your own executor; dexterm still holds no key and signs nothing. On this ladder it is the last rung and it is entirely yours:
|
|
30
|
+
|
|
31
|
+
1. Set your own limits: `dexterm autotrade limits set perTradeSol=X dailySol=Y buysPerDay=N maxOpenPositions=N` and any of the others (Going real, safely (https://dexterm.xyz/docs/going-real#your-limits)); `signal caps set` sets the same four. A promotion to real refuses until you have.
|
|
32
|
+
2. Set up a channel your executor reads (`dexterm autotrade signal channels ...`).
|
|
33
|
+
3. Have the evidence: a completed forward test of these exact rules with at least 10 closed paper trades (your limit `minForwardTrades`) and a backtest on record. Below that the promotion refuses and says what is missing.
|
|
34
|
+
4. `dexterm autotrade promote <id> --to real` (or `promote apply <pp-id>` for one the analyst proposed) hands over to `dexterm autotrade signal arm <id>`: the evidence panel, now with the journey line and the held-out verdict, then a typed phrase with a one-time code.
|
|
35
|
+
|
|
36
|
+
The analyst can propose real (never below the evidence floor), never apply it, set a cap, choose a bankroll, lower the floor or arm anything. Arming directly with `signal arm` when a rung is missing, or below the evidence floor, refuses unless you type the OVERRIDE phrase it shows on your own terminal; the override is journaled. A real strategy runs in the foreground with `dexterm autotrade run <id> --real`; in 0.2.0 the always-on service runs paper strategies only, so stop the service while a real run is on (one runner per computer). See real mode (https://dexterm.xyz/docs/real-mode).
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-build-a-strategy-by-chat-the-ladder
|
|
3
|
+
title: Build a strategy by chat › The ladder
|
|
4
|
+
kind: docs
|
|
5
|
+
page: build-a-strategy-by-chat
|
|
6
|
+
page_title: Build a strategy by chat
|
|
7
|
+
heading: The ladder
|
|
8
|
+
anchor: the-ladder
|
|
9
|
+
url: https://dexterm.xyz/docs/build-a-strategy-by-chat#the-ladder
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- build-a-strategy-by-chat
|
|
13
|
+
- ladder
|
|
14
|
+
- build
|
|
15
|
+
- strategy
|
|
16
|
+
- chat
|
|
17
|
+
confidence: high
|
|
18
|
+
owner: maintainers
|
|
19
|
+
origin: docs-generated
|
|
20
|
+
reviewed_by: generated@2026-10-16
|
|
21
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
22
|
+
sources:
|
|
23
|
+
- site/content/docs/build-a-strategy-by-chat.md
|
|
24
|
+
date: 2026-10-16
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
A strategy you build climbs one ladder, one rung at a time:
|
|
28
|
+
|
|
29
|
+
**draft → backtested → forward-tested → always-on (paper) → real**
|
|
30
|
+
|
|
31
|
+
| rung | what it needs | who does it |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| draft | a strategy that validates | the analyst proposes it, you apply it with a key |
|
|
34
|
+
| backtested | a backtest on your recorded history, with the held-out split | you or the analyst |
|
|
35
|
+
| forward-tested | a forward test that ran its whole window on live data, on paper | you or the analyst starts it; it runs by itself |
|
|
36
|
+
| always-on | a member of `autotrade.json`, run by the always-on service (https://dexterm.xyz/docs/autotrade#the-always-on-service) on paper | the analyst can propose it; only you apply it |
|
|
37
|
+
| real | real mode armed on your own terminal, with caps you set, above the evidence floor: a completed forward test with at least 10 closed paper trades and a backtest | only you, with a typed phrase (real mode (https://dexterm.xyz/docs/real-mode)) |
|
|
38
|
+
|
|
39
|
+
Every rung counts evidence measured on the strategy's **exact rules**. Renaming it, rewording its description or arming it for real keeps its evidence; changing any rule (an entry filter, a size, an exit, a limit) starts the ladder again from draft. No rung can be skipped, and `dexterm autotrade journey <id>` (or `J` on the `Q` screen) always shows where a strategy stands and what the next rung needs.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-build-a-strategy-by-chat-the-report
|
|
3
|
+
title: Build a strategy by chat › 3. Forward-test it on live data (paper) › The report
|
|
4
|
+
kind: docs
|
|
5
|
+
page: build-a-strategy-by-chat
|
|
6
|
+
page_title: Build a strategy by chat
|
|
7
|
+
heading: The report
|
|
8
|
+
anchor: the-report
|
|
9
|
+
url: https://dexterm.xyz/docs/build-a-strategy-by-chat#the-report
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- build-a-strategy-by-chat
|
|
13
|
+
- report
|
|
14
|
+
- forward-test
|
|
15
|
+
- live
|
|
16
|
+
- data
|
|
17
|
+
- paper
|
|
18
|
+
- build
|
|
19
|
+
- strategy
|
|
20
|
+
- chat
|
|
21
|
+
confidence: high
|
|
22
|
+
owner: maintainers
|
|
23
|
+
origin: docs-generated
|
|
24
|
+
reviewed_by: generated@2026-10-16
|
|
25
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
26
|
+
sources:
|
|
27
|
+
- site/content/docs/build-a-strategy-by-chat.md
|
|
28
|
+
date: 2026-10-16
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
`forward report` sets the forward test next to the backtest of the **same rules**, column by column: trades, win rate with its 95% interval, net, max drawdown, rug rate, and the fill cost against the mid price (with the drift from the backtest). It flags a forward win rate outside the backtest's interval, a deeper drawdown and more rugs than the history showed. Under 20 closed forward trades it says plainly that the sample is too small to claim anything, and it allows gain wording only when the backtest passes the evidence rule **and** the forward test made money on 20 or more trades.
|
package/dist/packages/mcp/assets/kb/docs/docs-build-a-strategy-by-chat-what-the-analyst-knows.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: docs-build-a-strategy-by-chat-what-the-analyst-knows
|
|
3
|
+
title: Build a strategy by chat › What the analyst knows
|
|
4
|
+
kind: docs
|
|
5
|
+
page: build-a-strategy-by-chat
|
|
6
|
+
page_title: Build a strategy by chat
|
|
7
|
+
heading: What the analyst knows
|
|
8
|
+
anchor: what-the-analyst-knows
|
|
9
|
+
url: https://dexterm.xyz/docs/build-a-strategy-by-chat#what-the-analyst-knows
|
|
10
|
+
tags:
|
|
11
|
+
- docs
|
|
12
|
+
- build-a-strategy-by-chat
|
|
13
|
+
- analyst
|
|
14
|
+
- knows
|
|
15
|
+
- build
|
|
16
|
+
- strategy
|
|
17
|
+
- chat
|
|
18
|
+
confidence: high
|
|
19
|
+
owner: maintainers
|
|
20
|
+
origin: docs-generated
|
|
21
|
+
reviewed_by: generated@2026-10-16
|
|
22
|
+
generated_from: dexterm/site content/docs (task-1420)
|
|
23
|
+
sources:
|
|
24
|
+
- site/content/docs/build-a-strategy-by-chat.md
|
|
25
|
+
date: 2026-10-16
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
The analyst's tools for this: `strategy_journey` (the ladder for one strategy), `strategy_backtest` (with the held-out split), `strategy_forward_start`, `strategy_forward_stop`, `strategy_forward_report` and `strategy_promote_propose`. It is told the whole ladder, refuses to skip a rung, and reports numbers with their trade counts and the verdict lines as they are. An observe-only scan session gets none of the starting, stopping or proposing tools.
|
|
29
|
+
|
|
30
|
+
Paper by default; experimental; not financial advice.
|