@znora/strategy-sdk
v0.1.0
Published
ZNORA strategy authoring surface — types + engine re-exports + LiveStrategy interface for student strategies on the chart-driven backtest service. No runner, no CLI, no candle store. Backtests run server-side via @znora/chart-mcp's backtest_run tool.
Downloads
25
Readme
@znora/strategy-sdk
The strategy authoring surface for the ZNORA chart-driven backtest service. Curated re-exports of every detector + the LiveStrategy interface students need to write strategies. No CLI, no local runner, no candle store — backtests run server-side via the chart-mcp's backtest_run tool.
What this is
import type { LiveStrategy } from '@znora/strategy-sdk';
import { scanForCISD, detectSimpleFVG } from '@znora/strategy-sdk';
export default {
meta: {
name: 'CISD + FVG long',
timeframes: ['M15'],
engines: ['cisd', 'fvg'],
},
evaluate(candles, symbol, tf) {
const m15 = candles[tf];
const cisds = scanForCISD(m15);
// ... your strategy logic
return { direction: 'long', entryPrice, stopLoss, takeProfit };
},
} satisfies LiveStrategy;What this is not
- Not a CLI. No
fxbg backtest, no127.0.0.1:9753viewer. Backtests run by asking Claude Code (via the paired@znora/chart-mcp) to run them. - Not a candle store. No
~/.fxbg/candles/SQLite mirror. Candles come from the chart's Postgres source of truth, server-side. - Not a deploy tool. No
fxbg deploy. Deployment to live signal workers is done from the chart's web UI.
Usage
Install through @znora/create-chart-project — you don't add it to a hand-rolled project:
npx @znora/create-chart-project --chart-origin https://forexbulgaria.bg my-strategiesThe scaffolder writes a package.json that depends on @znora/strategy-sdk, plus a .claude/skills/strategy-develop/SKILL.md Claude follows when you ask it to write a strategy.
Migration from @vasokai/fxbg-sdk
@vasokai/fxbg-sdk is the previous-generation SDK that bundled the local CLI runner. @znora/strategy-sdk is its slim successor:
| What | @vasokai/fxbg-sdk | @znora/strategy-sdk |
|---|---|---|
| Engine re-exports + types | ✅ | ✅ (identical surface) |
| LiveStrategy interface + v2 types | ✅ | ✅ (identical) |
| Local fxbg backtest CLI | ✅ | ❌ — backtests run server-side |
| Local SQLite candle store | ✅ | ❌ — candles come from server Postgres |
| Local viewer at 127.0.0.1:9753 | ✅ | ❌ — chart's BacktestOverlay renders trades |
| Bundled native deps (better-sqlite3) | ✅ | ❌ — pure JS, smaller install |
To migrate an existing fxbg-sdk strategy, change the import:
-import { scanForCISD, type LiveStrategy } from '@vasokai/fxbg-sdk';
+import { scanForCISD, type LiveStrategy } from '@znora/strategy-sdk';That's it. The exported names are identical.
License
See LICENSE.txt (commercial, academy-gated).
