LLM Council Expert Trader
- Experts
- Cedric Olivier Kusiele Some
- Versione: 6.0
- Attivazioni: 5
LLM Council Expert Trader: AI-Powered Multi-Agent Trading System
Revolutionize your trading with LLM Council Expert Trader – the cutting-edge Expert Advisor (EA) that harnesses the power of Large Language Models (LLMs) like Claude, GPT, and Qwen to make intelligent, adaptive trading decisions. Built on Smart Money Concepts (SMC) and Inner Circle Trader (ICT) principles, this EA acts as a "council" of specialized AI agents collaborating to analyze market bias, detect structures, select strategies, and execute trades with precision. No more relying on static indicators – this is dynamic, LLM-driven trading for the modern market!
Key Features:
- Multi-Agent Architecture: Four specialized LLM agents work in tandem:
- HTF Agent: Detects higher-timeframe bias (e.g., bullish/bearish on H4/H1) using SMC and AMD phases.
- Structure Agent: Scans M5 for Market Structure Shifts (MSS), Breaks of Structure (BOS), Fair Value Gaps (FVG), and Order Blocks.
- Strategy Agent: Adaptively selects or creates custom strategies (e.g., Conservative Breakout, Aggressive Reversal, Momentum Ride) based on performance and volatility.
- Execution Agent: Validates entries with strict risk-reward (min 1:2), dynamic SL/TP, and portfolio risk checks.
- Advanced Risk Management: Dynamic position sizing (0.25-2x base risk), drawdown protection (auto-reduces risk >5% DD), consecutive loss safeguards, and spread-adjusted SL (min 20-10000 points).
- Internal Position Management: Breakeven moves (at 50% to TP), trailing stops (behind structures), partial profits (multi-stage: 30%/60%), and auto-close on adverse signals or inactivity.
- LLM Integration: Uses OpenRouter API for real-time AI analysis (supports models like Claude-3.5-Sonnet, o1-mini, Qwen-2.5-72B).
- Indicator Support: Integrates with ICT Concepts, Smart Money Concepts, Liquidity Sweeps, AVPT Volume Profile, and more for confluence.
How It Works:
- Bias Detection: HTF Agent analyzes D1/H4/H1 for overall direction (BUY/SELL/NEUTRAL).
- Structure Scan: Structure Agent identifies entry zones on M5 (e.g., FVG retracements aligned with bias).
- Strategy Selection: Strategy Agent chooses or customizes an approach based on volatility, recent performance (e.g., ultra-conservative after losses), and structure.
- Execution Validation: Execution Agent confirms setup with R:R checks, then places market/limit/stop orders.
- Ongoing Management: Monitors positions with trailing, partials, and invalidation checks.
This EA excels in forex pairs like USDJPY, GBPUSD (M5-H1 timeframes) but adapts to any symbol. It's ideal for prop firm challenges, live accounts, or backtesting on demo accounts – with built-in drawdown tracking from deposits for realistic risk control.
Performance Highlights (from code logic and typical backtests*):
- Win Rate: 45-65% (strategy-dependent).
- Profit Factor: 1.5-2.5+ with adaptive strategies.
- Max Drawdown: <15% with protections.
- API Efficiency: Low-cost models minimize expenses (~$0.01-0.05 per analysis).
*Results vary by settings/market. Past performance ≠ future results. Test thoroughly.
Input Parameters:
- Multi-Agent Configuration:
- OpenRouterURL: "https://openrouter.ai/api/v1/chat/completions" (API endpoint).
- ApiKey: "" (Your OpenRouter API key – required).
- HTF Agent:
- HTFModel: "anthropic/claude-3.5-sonnet" (LLM model).
- HTFTimeframe1: PERIOD_H4, HTFTimeframe2: PERIOD_H1.
- HTFMaxTokens: 2000.
- Structure Agent:
- StructureModel: "openai/o3-mini".
- StructureTimeframe: PERIOD_M5.
- StructureMaxTokens: 2500.
- Strategy Agent:
- StrategyModel: "qwen/qwen-2.5-72b-instruct".
- StrategyMaxTokens: 1024.
- Execution Agent:
- ExecutionModel: "openai/o1".
- ExecutionMaxTokens: 3000.
- MinRiskReward: 2.0.
- Data Collection:
- BarsToSend: 30 (Bars for LLM analysis).
- MaxIndicators: 5, MaxBuffersPerIndi: 6, MaxIndicatorValues: 5.
- Dynamic Risk:
- SpreadMultiplier: 3.0.
- UseDynamicSL: true, MinSLPoints: 20, MaxSLPoints: 10000.
- MinUtilityScore: 0.95.
- AdjustRiskForSpread: true.
- Position Management:
- EnableInternalPM: true.
- BEMoveAtPercent: 50.0 (Breakeven at % to TP).
- TrailStartPercent: 60.0, TrailDistancePoints: 30.0, TrailBehindStructure: true.
- MaxTradeDurationHours: 48, InactivityCloseHours: 8.
- PartialProfitEnabled: false, PartialClosePercent: 50.0, FirstTPPercent: 50.0.
- PartialLevels1/2: 30.0/60.0, PartialPercents1/2: 30.0/50.0, TrailSLAfterPartial: true.
- AutoCloseOnAdverseMSS: true.
- PMCheckIntervalSecs: 5.
- Trading Parameters:
- RiskPercent: 2.0.
- MaxSpreadPoints: 50, SlippagePoints: 30.
- MagicNumber: 126000.
- MinMinutesBetween: 15.
- AllowNewTrades: true, AllowPositionMgmt: true, AllowPendingOrders: true.
- PendingOrderExpiry: 24 (hours).
- MinModifyPoints: 10.0.
- Debug:
- DebugMode: true, LogFullResponse: false, LogPrompts: true.
Usage Instructions:
- Set your OpenRouter API key (get one at openrouter.ai – supports multiple LLMs).
- Download each of these following indicators .ex5 files and save them at \MQL5\Indicators : AVPT_indicator; CRT_Candle_Range_Theory_Indicator; HistoricaPriceProjection; ICT_Concepts; Liquidity Swings; Liquidity Sweep; Multi_Timeframe_Harmony_Index_indicator
- Attach first each of these following indicators to M5-H1 charts (e.g., EURUSD): AVPT_indicator; CRT_Candle_Range_Theory_Indicator; HistoricaPriceProjection; ICT_Concepts; Liquidity Swings; Liquidity Sweep; Multi_Timeframe_Harmony_Index_indicator
- Attach the EA to M5-H1 charts (e.g., EURUSD). You may want to use these config .set files : Forex trading config; Crypto trading config
- Monitor logs for agent decisions and trading operations.
Mandatory Step: Add URL in the Terminal
According to the documentation: To use the WebRequest() function, add the required server address to the list of allowed URLs in the "Tools" tab of the "Options" window (see the video). The server’s port is automatically selected based on the specified protocol - 80 for "http://" and 443 for "https://". The URL address to add is: https://openrouter.ai
