(sb *strings.Builder, variant string, zh bool)
| 449 | } |
| 450 | |
| 451 | func writeModeVariant(sb *strings.Builder, variant string, zh bool) { |
| 452 | switch strings.ToLower(strings.TrimSpace(variant)) { |
| 453 | case "aggressive": |
| 454 | if zh { |
| 455 | sb.WriteString("## Mode: Aggressive\n- Prioritize capturing trend breakouts; may scale in when confidence ≥ 70\n- Allow larger positions, but must strictly set stop-loss and explain the risk-reward ratio\n\n") |
| 456 | } else { |
| 457 | sb.WriteString("## Mode: Aggressive\n- Prioritize capturing trend breakouts; may scale in when confidence ≥ 70\n- Allow larger positions, but must strictly set stop-loss and explain the risk-reward ratio\n\n") |
| 458 | } |
| 459 | case "conservative": |
| 460 | if zh { |
| 461 | sb.WriteString("## Mode: Conservative\n- Open positions only when multiple signals resonate\n- Prioritize capital preservation; pause for multiple periods after consecutive losses\n\n") |
| 462 | } else { |
| 463 | sb.WriteString("## Mode: Conservative\n- Open positions only when multiple signals resonate\n- Prioritize capital preservation; pause for multiple periods after consecutive losses\n\n") |
| 464 | } |
| 465 | case "scalping": |
| 466 | if zh { |
| 467 | sb.WriteString("## Mode: Scalping\n- Focus on short-term momentum, smaller profit targets but require quick action\n- If price doesn't move as expected within two bars, immediately reduce position or stop-loss\n\n") |
| 468 | } else { |
| 469 | sb.WriteString("## Mode: Scalping\n- Focus on short-term momentum, smaller profit targets but require quick action\n- If price doesn't move as expected within two bars, immediately reduce position or stop-loss\n\n") |
| 470 | } |
| 471 | } |
| 472 | } |
| 473 | |
| 474 | func writeHardConstraints(sb *strings.Builder, accountEquity float64, riskControl store.RiskControlConfig, btcEthPosValueRatio, altcoinPosValueRatio float64, singleSymbol bool, primarySymbol string, zh bool) { |
| 475 | if zh { |
no outgoing calls
no test coverage detected