diff --git a/src/prompts.rs b/src/prompts.rs index 8e3cbbf..949e5da 100644 --- a/src/prompts.rs +++ b/src/prompts.rs @@ -78,7 +78,9 @@ Action quantity MUST be a fixed decimal string that parses as a floating-point n e.g. `"quantity": "0.001"`. 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"`, or any non-numeric string — these will be rejected immediately. +`"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. ### Multi-timeframe Any expression can reference a different timeframe via "timeframe" field. @@ -163,9 +165,10 @@ Common mistakes to NEVER make: - `adx` is a FUNC NAME, not a Condition kind. To filter for strong trends (ADX > 25): `{{"kind":"compare","left":{{"kind":"func","name":"adx","period":14}},"op":">","right":{{"kind":"literal","value":"25"}}}}` NEVER write `{{"kind":"adx",...}}` — `adx` is not a Condition kind, it is a FuncName used inside `{{"kind":"func",...}}`. -- `roc` (rate of change), `hma` (Hull MA), `vwap`, `macd`, `cci`, `stoch` are NOT supported. +- `roc` (rate of change), `hma` (Hull MA), `ma` (generic), `vwap`, `macd`, `cci`, `stoch` are NOT supported. Use `sma`, `ema`, `wma`, `rsi`, `atr`, `adx`, `supertrend`, `std_dev`, `sum`, `highest`, `lowest`, - `bollinger_upper`, `bollinger_lower` only. + `bollinger_upper`, `bollinger_lower` only. There is no generic `ma` — use `sma` or `ema` explicitly. + Hull MA can be approximated as: WMA(2*WMA(n/2) - WMA(n)) using `apply_func`. ## Working examples