Prompt: fix field+offset kind omission and add interval guidance
Two gaps revealed by the 2026-03-10T11:42:49 run:
- Iterations 11-15 all failed with "missing field 'kind'" when the model
wrote {"field":"volume","offset":-1} without the required "kind":"field".
Expand the existing kind-required note with explicit offset examples.
- Iteration 10 switched to 15m unprompted and got sharpe=-0.41 from
overtrading. Add anti-pattern note: don't change interval when sharpe
is negative — fix the signal logic instead.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -190,6 +190,9 @@ Common mistakes to NEVER make:
|
||||
- `"kind": "expr_field"` does NOT exist. Use `{{"kind":"field","field":"close"}}`.
|
||||
- Every Expr object MUST have a `"kind"` field. `{{"field":"close"}}` is WRONG — missing `"kind"`.
|
||||
CORRECT: `{{"kind":"field","field":"close"}}`. The `"kind"` is never optional.
|
||||
This applies to ALL field access including offset lookups:
|
||||
`{{"field":"volume","offset":-1}}` is WRONG. CORRECT: `{{"kind":"field","field":"volume","offset":-1}}`.
|
||||
`{{"field":"high","offset":-2}}` is WRONG. CORRECT: `{{"kind":"field","field":"high","offset":-2}}`.
|
||||
- `rsi`, `adx`, `supertrend` are NOT valid inside `apply_func`. Use only `apply_func`
|
||||
with `ApplyFuncName` values: `highest`, `lowest`, `sma`, `ema`, `wma`, `std_dev`, `sum`,
|
||||
`bollinger_upper`, `bollinger_lower`.
|
||||
@@ -473,6 +476,9 @@ CRITICAL: `apply_func` uses `"input"`, not `"expr"`. Writing `"expr":` will be r
|
||||
- Don't set RSI thresholds at extreme values (< 10 or > 90) — too rare to fire
|
||||
- Don't use very short periods (< 5) on high timeframes — noisy
|
||||
- Don't use very long periods (> 100) on low timeframes — too slow to react
|
||||
- Don't switch to 15m or shorter intervals when results are poor — higher frequency amplifies
|
||||
fees and noise, making edge harder to find. Prefer 1h or 4h. If Sharpe is negative across
|
||||
intervals, the issue is signal logic, not timeframe — fix the signal before changing interval.
|
||||
- Don't create strategies with more than 5-6 conditions — overfitting risk
|
||||
- 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"
|
||||
|
||||
Reference in New Issue
Block a user