Generates a single-file dual-mode trading strategy that runs backtests with VectorBT and live trading with OpenAlgo. Supports templates like ema-crossover, rsi, supertrend, and ML models. Asks for indicator library and execution type, then produces an upload-ready Python file.
Ships in openalgo-execution-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Create a complete dual-mode strategy file from a template.
Parse $ARGUMENTS as: template symbol exchange interval
$0 = template (e.g. ema-crossover, rsi, supertrend, donchian, macd, opening-range, atr-breakout, bb-squeeze, ml-logistic, ml-xgb, pairs-trading, regime-trend, event-driven)$1 = symbol (e.g. SBIN, RELIANCE, NIFTY). Default: template's catalog default$2 = exchange (e.g. NSE, NSE_INDEX, NFO). Default: template's catalog default$3 = interval (e.g. 1m, 5m, 15m, D). Default: template's defaultIf no arguments, ask the user which template they want. See algo-expert/rules/strategy-catalog.md.
After parsing arguments, ASK the user (do not assume defaults silently):
Indicator library: (1) openalgo [default] (2) talib
Execution type - default depends on template (see strategy-catalog.md):
(1) end-of-candle (eoc) - signal at bar close, MARKET on next bar (default for most)(2) real-time limit (limit) - tick-driven LIMIT placement (default for atr-breakout)(3) stop-trigger (stop) - broker-side SL/SL-M (default for opening-range)Tell the user the recommended default for their template and let them override.
algo-expert/rules/unified-strategy-pattern.md, mode-toggle.md, and execution-types.md.algo-expert/rules/assets/<template>/strategy.py as the starting point.strategies/<template>_<symbol>/ directory if not present.strategies/<template>_<symbol>/strategy.py and:
SYMBOL, EXCHANGE, INTERVAL constants with user valuesINDICATOR_LIB to user's choice ("openalgo" or "talib")EXECUTION_TYPE to user's choice ("eoc", "limit", "stop")STRATEGY_NAME to <template>_<symbol> (default; can be overridden by env)PRODUCT to match the asset class (NSE equity → MIS or CNC; NFO → NRML)QUANTITY to a reasonable starting value (1 for equity, lot size for futures)ml-logistic, ml-xgb), also copy train.py and remind the user to run it BEFORE running the strategy:
python strategies/ml_logistic_RELIANCE/train.py
self-hosted-strategies.md:
MODE if no --mode CLI argpython strategies/<name>/strategy.py --mode backtestpython strategies/<name>/strategy.py --mode live/algo-host <name> to validate and generate upload guide| Template | Default symbol | Default exchange | Default interval | Default execution |
|---|---|---|---|---|
ema-crossover | SBIN | NSE | 5m | eoc |
rsi | RELIANCE | NSE | 15m | eoc |
supertrend | NIFTY | NSE_INDEX | 5m | eoc |
donchian | NIFTY | NSE_INDEX | D | eoc |
macd | INFY | NSE | D | eoc |
opening-range | SBIN | NSE | 5m | stop |
atr-breakout | RELIANCE | NSE | 5m | limit |
bb-squeeze | TCS | NSE | 15m | eoc |
ml-logistic | RELIANCE | NSE | 15m | eoc |
ml-xgb | RELIANCE | NSE | 15m | eoc |
pairs-trading | SBIN/PNB | NSE | D | eoc (two-leg) |
regime-trend | RELIANCE | NSE | D | eoc (ADX+VIX+volume gates) |
event-driven | RELIANCE | NSE | D | scheduled-time |
For options templates (short-straddle, iron-condor), use /algo-options instead.
The file's COSTS = cost_lookup(PRODUCT, EXCHANGE) auto-resolves:
If the user wants different broker rates, point them to algo-expert/rules/transaction-costs.md to override the constants.
The template comes with reasonable RISK values (see strategy-catalog.md). Tell the user these are starting points, not optimal - tune via backtest before live.
strategies/<name>/MODE=live without the user explicitly running itWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
trading-strategy, backtesting, live-trading, vectorbt, openalgo, dual-mode
/openalgo-execution-skills:algo-strategy [template] [symbol] [exchange] [interval]from openalgo-execution-skills
openalgo-execution-skills@fin-skills is listed by howard-lynn-ye/fin-rsi — review the source before installing
npx claudepluginhub howard-lynn-ye/fin-rsi --plugin openalgo-execution-skills7 skills in this plugin
/algo-expertOpenAlgo execution expert. Auto-loaded knowledge base for building algorithmic trading strategies that toggle between VectorBT backtest and OpenAlgo live execution. Triggers when user mentions OpenAlgo trading strategies, dual-mode strategies, /python self-hosted strategies, options execution (short straddle, iron condor), portfolio risk caps, or live execution with stop loss / target / trailing stop / risk management./algo-hostValidate a generated strategy and produce an upload guide for OpenAlgo's /python self-hosted strategy page. Confirms env-var reads, SIGTERM, stdout-only logging./algo-optionsGenerate options-only execution strategies (short straddle, iron condor). Backtest mode is intentionally disabled. Live mode uses optionsmultiorder + per-leg SL.Other plugins' skills for the same job