From a435d3a99da5f4927f07b8b6b177c60bfdcd8754 Mon Sep 17 00:00:00 2001 From: rob thijssen Date: Tue, 10 Mar 2026 14:21:55 +0200 Subject: [PATCH] Define concrete 'promising' threshold and enforce indicator diversity in ledger-informed prompt - Replace vague "promising metrics" with avg_sharpe >= 0.5 AND >= 10 trades per instrument - Add indicator-family diversity rule: if all prior strategies share the same core indicator (e.g. all Bollinger Bands), the first strategy of the new run must use a different family - Give explicit examples of alternative families: MACD, ATR breakout, volume spike, donchian channel breakout, stochastic oscillator - Extend the no-repeat ban to strategies with fewer than 5 trades per instrument Co-Authored-By: Claude Sonnet 4.6 --- src/prompts.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/prompts.rs b/src/prompts.rs index 680ca87..6625a5b 100644 --- a/src/prompts.rs +++ b/src/prompts.rs @@ -500,10 +500,17 @@ pub fn initial_prompt(instruments: &[String], candle_intervals: &[String], prior None => String::new(), }; let starting_instruction = if prior_summary.is_some() { - "Based on the prior results above: if the best strategy has promising metrics, \ -refine it. If all prior results were poor (0 trades or deeply negative Sharpe), try a \ -clearly different indicator family or candle interval than what was already attempted. \ -Do NOT repeat approaches that consistently produced 0 trades." + "Based on the prior results above:\n\ +- A strategy is \"promising\" if avg_sharpe >= 0.5 AND it traded >= 10 times per instrument. \ +If the best prior strategy meets both thresholds, refine it (tighten entry conditions, \ +adjust the exit, or tune the interval).\n\ +- If no prior strategy reaches avg_sharpe >= 0.5, do NOT repeat the same indicator family. \ +Scan the best-strategies list: if they all use the same core indicator (e.g. all use \ +Bollinger Bands, or all use EMA crossovers, or all use RSI threshold), your FIRST strategy \ +MUST use a completely different indicator family — for example: MACD crossover, ATR \ +breakout, volume spike, donchian channel breakout, or stochastic oscillator. Only after \ +that novelty attempt may you refine prior work.\n\ +- Never repeat an approach that produced 0 trades or fewer than 5 trades per instrument." } else { "Start with a multi-timeframe trend-following approach with proper risk management \ (stop-loss, time exit, and ATR-based position sizing)."