Competitive LLM Trading Agents with PnL-Based Prompt Adaptation
Summary
This article describes an architecture for running multiple LLM trading agents in parallel in MetaTrader 5. Rather than pooling agent opinions into a consensus, each agent follows a distinct trading philosophy and has its own notional capital, performance record, and prompt state. Profits, losses, streaks, and rank are used to alter subsequent prompts, while persistent records preserve agent status between sessions. Distinct magic numbers let agents manage their positions independently within one account, and a reward mechanism assigns realized profit or loss to the agent whose position closed.
The system supports observation, competitive trading, and selection modes, with evaluation planned through Strategy Tester metrics such as drawdown, Profit Factor, win rate, and agent survival. The article provides engineering details and example rules for ten agents, but the supplied text does not report measured backtest results. Prompt-driven changes in aggressiveness are design choices rather than demonstrated improvements, and the system’s performance would need reproducible testing against alternatives such as consensus-based decisions.
Key ideas
- Each agent trades under a distinct rule set and is evaluated through its own capital and outcomes.
- Agent capital, streak, and rank feed into prompt updates that may change trading aggressiveness.
- Unique magic numbers allow agents to track and close their own positions independently in a shared account.
- The framework describes persistence and reward tracking, with evaluation intended to use standard backtest metrics.
- The article outlines a testable architecture but provides no reported evidence that competition improves returns.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.