diff --git a/src/prompts.rs b/src/prompts.rs index 0b9af69..279d429 100644 --- a/src/prompts.rs +++ b/src/prompts.rs @@ -74,14 +74,22 @@ bars_since_entry — complete bars elapsed since position was opened balance — free balance of a named asset (e.g. "usdt", "usdc") ### Quantity -Action quantity MUST be a fixed decimal string that parses as a floating-point number, -e.g. `"quantity": "0.001"`. +Action quantity MUST be a fixed decimal string that parses as a floating-point number. NEVER use an expression object for quantity — only plain decimal strings are accepted. NEVER use placeholder strings like `"ATR_SIZED"`, `"FULL_BALANCE"`, `"percent_of_balance"`, `"dynamic"`, `"all"`, or any non-numeric string — these will be rejected immediately. To exit a position, use the SAME decimal string as the entry rule — the backtester matches open quantity automatically. There is no "close all" concept; just repeat the entry quantity. +Size your quantity to represent roughly 5–10% of the initial $10,000 USDC balance at +approximate current prices. Reference values (adjust if market prices differ significantly): +- BTC: `"0.01"` ≈ $800 (8% of $10k) +- ETH: `"3.0"` ≈ $600 (6% of $10k) +- SOL: `"50.0"` ≈ $700 (7% of $10k) +Since strategies run across all instruments with the same quantity string, choose a value +appropriate for the primary instrument you are designing for. Avoid `"0.001"` — it produces +negligible exposure and makes results statistically meaningless. + ### Multi-timeframe Any expression can reference a different timeframe via "timeframe" field. Use higher timeframes as trend filters, lower timeframes for entry precision. @@ -194,7 +202,7 @@ Common mistakes to NEVER make: {{"kind": "ema_trend", "period": 50, "direction": "above"}} ] }}, - "then": {{"side": "buy", "quantity": "0.001"}} + "then": {{"side": "buy", "quantity": "0.01"}} }}, {{ "comment": "Sell: EMA9 crosses below EMA21, OR 2% stop-loss, OR 72-bar time exit", @@ -222,7 +230,7 @@ Common mistakes to NEVER make: }} ] }}, - "then": {{"side": "sell", "quantity": "0.001"}} + "then": {{"side": "sell", "quantity": "0.01"}} }} ] }} @@ -245,7 +253,7 @@ Common mistakes to NEVER make: {{"kind": "bollinger", "period": 20, "band": "below_lower"}} ] }}, - "then": {{"side": "buy", "quantity": "0.001"}} + "then": {{"side": "buy", "quantity": "0.01"}} }}, {{ "comment": "Sell: RSI recovers above 55, OR 3% stop-loss, OR 48-bar time exit", @@ -273,7 +281,7 @@ Common mistakes to NEVER make: }} ] }}, - "then": {{"side": "sell", "quantity": "0.001"}} + "then": {{"side": "sell", "quantity": "0.01"}} }} ] }} @@ -300,7 +308,7 @@ Common mistakes to NEVER make: }} ] }}, - "then": {{"side": "buy", "quantity": "0.001"}} + "then": {{"side": "buy", "quantity": "0.01"}} }}, {{ "comment": "Sell: 2-ATR stop-loss below entry price, OR 48-bar time exit", @@ -335,7 +343,7 @@ Common mistakes to NEVER make: }} ] }}, - "then": {{"side": "sell", "quantity": "0.001"}} + "then": {{"side": "sell", "quantity": "0.01"}} }} ] }} @@ -375,7 +383,7 @@ The MACD line is `EMA(12) - EMA(26)`; the signal line is `EMA(9)` of the MACD li }} ] }}, - "then": {{"side": "buy", "quantity": "0.001"}} + "then": {{"side": "buy", "quantity": "0.01"}} }}, {{ "comment": "Sell: MACD crosses below signal, OR 2% stop-loss, OR 72-bar time exit", @@ -420,7 +428,7 @@ The MACD line is `EMA(12) - EMA(26)`; the signal line is `EMA(9)` of the MACD li }} ] }}, - "then": {{"side": "sell", "quantity": "0.001"}} + "then": {{"side": "sell", "quantity": "0.01"}} }} ] }} @@ -440,8 +448,8 @@ always compose it as `bin_op(sub, func(ema,12), func(ema,26))` as shown above. - Don't ignore fees — a strategy needs to overcome 0.1% per round trip - Always gate buy rules with position state "flat" and sell rules with "long" - Never add a short-entry (sell when flat) rule — spot markets are long-only -- Never use an expression object for `quantity` — it must always be a plain decimal string like `"0.001"` -- Never use a placeholder string for `quantity` — `"ATR_SIZED"`, `"FULL_BALANCE"`, `"dynamic"`, etc. are all invalid and will be rejected. Use `"0.001"` or similar. +- Never use an expression object for `quantity` — it must always be a plain decimal string like `"0.01"` +- Never use a placeholder string for `quantity` — `"ATR_SIZED"`, `"FULL_BALANCE"`, `"dynamic"`, etc. are all invalid and will be rejected. Use `"0.01"` or similar. "## ) }