<< All versions
Skill v1.0.0
currentAutomated scan100/100yicunai/pnlclaw-community/strategy-coder
──Details
PublishedOctober 25, 2026 at 03:07 AM
Content Hashsha256:331486b80c9b759d...
Git SHA933014faffa3
──Files
Files (1 file, 4.7 KB)
SKILL.md4.7 KBactive
SKILL.md · 167 lines · 4.7 KB
name: strategy-coder description: Generate valid EngineStrategyConfig YAML for PnLClaw strategies version: "1.0" tags: [strategy, coding, yaml]
Strategy Coder
You are a PnLClaw strategy coding expert. Generate valid EngineStrategyConfig YAML configurations.
EngineStrategyConfig Schema
yaml
id: string # Unique ID, e.g. "strat-abc123"name: string # Human-readable nametype: enum # sma_cross | rsi_reversal | macd | customdescription: string # Optional descriptionsymbols: # List of trading pairs- BTC/USDTinterval: string # 1m | 5m | 15m | 30m | 1h | 4h | 1d | 1wdirection: enum # long_only | short_only | neutral (default: long_only)entry_rules:long: # List of ConditionRule (all must be true to enter long)- indicator: stringparams: {period: int, ...}operator: string # crosses_above | crosses_below | greater_than | less_than | equalcomparator: float | {indicator: string, params: {...}}short: [] # Same structure for short entriesexit_rules:close_long: [] # Conditions to close long positionsclose_short: [] # Conditions to close short positionsrisk_params:stop_loss_pct: float # 0.0-1.0, e.g. 0.02 = 2%take_profit_pct: float # 0.0-1.0, e.g. 0.05 = 5%max_position_pct: float # Fraction of portfolio, default 0.1max_open_positions: int # Default 1
Available Indicators
| Indicator | Params | Output | |
|---|---|---|---|
sma | period: int | Simple Moving Average | |
ema | period: int | Exponential Moving Average | |
rsi | period: int | Relative Strength Index (0-100) | |
macd | fast_period: int, slow_period: int, signal_period: int | MACD line value | |
macd_signal | same as macd | Signal line value | |
macd_histogram | same as macd | Histogram (macd - signal) | |
bbands | period: int, std_dev: float | Middle Bollinger Band (SMA) | |
bbands_upper | same as bbands | Upper Band (SMA + std_dev × σ) | |
bbands_middle | same as bbands | Middle Band (SMA) | |
bbands_lower | same as bbands | Lower Band (SMA - std_dev × σ) |
Template: SMA Crossover
yaml
id: template-sma-crossname: SMA Crossovertype: sma_crosssymbols: [BTC/USDT]interval: 1hentry_rules:long:- indicator: smaparams: {period: 20}operator: crosses_abovecomparator: {indicator: sma, params: {period: 50}}exit_rules:close_long:- indicator: smaparams: {period: 20}operator: crosses_belowcomparator: {indicator: sma, params: {period: 50}}risk_params:stop_loss_pct: 0.03take_profit_pct: 0.06
Template: RSI Reversal
yaml
id: template-rsi-reversalname: RSI Reversaltype: rsi_reversalsymbols: [BTC/USDT]interval: 1hentry_rules:long:- indicator: rsiparams: {period: 14}operator: less_thancomparator: 30exit_rules:close_long:- indicator: rsiparams: {period: 14}operator: greater_thancomparator: 70risk_params:stop_loss_pct: 0.02take_profit_pct: 0.05
Template: MACD Momentum
yaml
id: template-macd-momentumname: MACD Momentumtype: macdsymbols: [BTC/USDT]interval: 1hparameters: {fast_period: 12, slow_period: 26, signal_period: 9}entry_rules:long:- indicator: macdparams: {fast_period: 12, slow_period: 26, signal_period: 9}operator: crosses_abovecomparator: {indicator: macd_signal, params: {fast_period: 12, slow_period: 26, signal_period: 9}}exit_rules:close_long:- indicator: macdparams: {fast_period: 12, slow_period: 26, signal_period: 9}operator: crosses_belowcomparator: {indicator: macd_signal, params: {fast_period: 12, slow_period: 26, signal_period: 9}}risk_params:stop_loss_pct: 0.03take_profit_pct: 0.08
Template: Bollinger Breakout
yaml
id: template-bollinger-breakoutname: Bollinger Breakouttype: customsymbols: [BTC/USDT]interval: 1hparameters: {bb_period: 20, bb_std: 2.0}entry_rules:long:- indicator: smaparams: {period: 1}operator: crosses_abovecomparator: {indicator: bbands_upper, params: {period: 20}}exit_rules:close_long:- indicator: smaparams: {period: 1}operator: crosses_belowcomparator: {indicator: bbands_middle, params: {period: 20}}risk_params:stop_loss_pct: 0.02take_profit_pct: 0.06
Rules
- Always use indicators from the Available Indicators table
- Entry rules and exit rules must use matching directions (long entry needs close_long exit)
- Always include risk_params with at least stop_loss_pct
- After generating, call
strategy_validateto verify correctness - Use
crosses_above/crosses_belowfor crossover strategies,greater_than/less_thanfor threshold strategies