Swarm Intelligence & Multi-Agent Simulation
In nature, no single ant knows the optimal path to food. No individual bird understands the aerodynamics of a flock formation. Yet ant colonies find the shortest routes with remarkable efficiency, and murmurations of starlings execute impossibly coordinated turns without a leader. The intelligence is not in any single agent—it is in the interaction between thousands of simple agents, each following their own rules, each responding to local information.
Ironbrand's signal engine operates on the same principle. Rather than trusting a single algorithm, a single model, or a single strategy to predict where markets will go, we run a multi-agent simulation framework where thousands of virtual traders—each with different strategies, different risk profiles, and different weightings of input data—analyze the same market conditions in parallel. When these agents converge on a directional conclusion despite their diversity, the resulting signal carries genuine predictive weight.
This document explains how the system works, from individual agent architecture through consensus formation to the final signal output that Ironbrand users see on their dashboards.
The Three-Level Architecture
Before diving into the swarm itself, it is essential to understand the three-level architecture that feeds it. Every signal that reaches you has passed through all three layers, each adding a dimension of analysis that the others cannot provide alone.
The foundation. A real-time engine that processes multi-timeframe candlestick data (5-minute, 15-minute, and 1-hour) to detect structural shifts in market direction. This layer identifies Break of Structure (BOS) events on the 15-minute timeframe, then looks for high-probability entry setups on the 5-minute timeframe using EMA crossovers, RSI filters, ATR-based volatility detection, and volume confirmation. Every signal includes precise entry, stop-loss, and four take-profit levels calculated from ATR-derived risk multiples.
Macro intelligence. This layer aggregates data from six independent sources: the Fear & Greed Index, exchange funding rates, aggregate open interest, 24-hour liquidation ratios, Bitcoin dominance, and social sentiment scores. Each data point is scored on a directional bias scale from -5 (strongly bearish) to +5 (strongly bullish), and the composite score determines whether the broader market environment supports or contradicts the technical signal.
The decision layer. Multiple large language models from different providers analyze the combined technical signal and market context. They operate in cascade, consensus, or direct modes depending on signal confidence requirements. This is where the swarm intelligence converges into an actionable decision.
Agent Archetypes: Who Lives in the Swarm
The power of swarm intelligence comes from diversity. If every agent used the same strategy, consensus would be meaningless—it would simply reflect the biases of that one approach. Ironbrand's agent population is deliberately heterogeneous, spanning five primary archetypes and numerous sub-variants within each.
1. Trend Followers
These agents believe that price trends persist longer than most market participants expect. They look for established directional moves confirmed by multiple timeframes and ride them until structure breaks down.
- Data weightings: Heavy emphasis on EMA alignment across 5M, 15M, and 1H timeframes. A Trend Follower agent considers a signal strongly valid when the 5-minute EMA(20) is above EMA(50), and price on the 1-hour chart is above EMA(20)—a configuration the V6 engine tracks as "trend_1h: aligned."
- Risk profile: Wide stops (2.0x-2.5x ATR), targeting TP3 and TP4 at 2.0R and 2.6R risk multiples respectively. These agents accept lower win rates in exchange for larger per-trade gains.
- Time horizon: Hours to days. They ignore short-term noise and require structural confirmation (BOS regime change) before entering.
- Weakness: Prone to whipsaws during ranging markets. The swarm compensates by reducing their weight when ATR is contracting and no clear BOS regime is established.
2. Mean-Reversion Specialists
The natural counterpart to trend followers. These agents bet that extreme moves revert to equilibrium. When RSI reaches extremes (below 30 or above 70), when funding rates show heavy crowding on one side, or when the Fear & Greed Index hits extreme levels, mean-reversion agents activate.
- Data weightings: RSI values, funding rate extremes, Fear & Greed Index positioning, and liquidation cascade data. An RSI of 28 combined with extreme fear (F&G below 20) and negative funding rates creates a strong contrarian long signal for these agents.
- Risk profile: Tight stops (1.0x-1.5x ATR), targeting TP1 and TP2 at 0.8R and 1.4R. Quick profits, high win rate expected.
- Time horizon: Minutes to hours. These agents trade the snap-back, not the trend.
- Weakness: Get destroyed in strong trends where "extreme" readings persist far longer than expected. The V6 engine's BOS regime filter prevents mean-reversion entries during confirmed trending structure.
3. Breakout Traders
These agents specialize in the moments of structural change—the Break of Structure (BOS) events that the V6 engine detects on the 15-minute timeframe. When price closes above the last swing high (bullish BOS) or below the last swing low (bearish BOS), breakout agents become active.
- Data weightings: BOS level, expansion detection (candle range exceeding 1.8x ATR), volume surge confirmation (volume ratio above 1.5x the 20-period SMA), and impulse detection (rolling 2-bar range sum exceeding the ATR expansion threshold).
- Risk profile: Moderate stops (1.5x-2.0x ATR), targeting TP2 and TP3. These agents want the initial thrust after structure breaks but exit before the full trend develops.
- Entry logic: After a BOS event, breakout agents look for the "BOS retest" setup—price pulls back to the broken structural level, touches it within a tolerance of 0.25x ATR, then closes back in the breakout direction. This pattern is one of the two primary entry triggers in the V6 engine.
- Weakness: False breakouts. The V6 engine mitigates this with the "require_close" parameter: a BOS is only confirmed when a 15-minute candle closes beyond the swing level, not merely wicks through it.
4. On-Chain Specialists
These agents focus on blockchain-level data: exchange inflows and outflows, whale wallet movements, mining difficulty adjustments, and network activity metrics across 18+ blockchain networks. While the V6 engine primarily operates on exchange data, on-chain agents provide a crucial cross-validation layer.
- Data weightings: Exchange net flows (large outflows = accumulation = bullish), whale transaction counts, mining hash rate trends, and active address counts.
- Risk profile: Conservative. On-chain signals are slow-moving and better suited for bias confirmation than precise timing. These agents rarely trigger entries on their own but significantly influence the confidence score.
- Time horizon: Days to weeks. On-chain data reflects fundamental supply/demand dynamics that unfold slowly.
- Contribution to swarm: When on-chain agents agree with the technical signal direction, confidence increases by 10-15%. When they disagree, the system treats it as a caution flag.
5. Sentiment Specialists
These agents process social media sentiment, news tone, and prediction market probabilities. They use data from the political context system (GDELT, CryptoPanic, Polymarket) and social sentiment feeds (CoinGecko community data, Twitter/X analysis) to gauge market psychology.
- Data weightings: GDELT average tone (-15 to +15 scale), CryptoPanic sentiment score (-1.0 to +1.0), Polymarket risk score (0-10), and social bull/bear ratios.
- Risk profile: Variable. Sentiment agents apply a bias modifier of -2 to +2 on top of the technical signal's score. They do not generate entries independently but can veto or boost signals from other agent types.
- Contrarian logic: At extreme sentiment readings, these agents flip to contrarian mode. When the Fear & Greed Index drops below 20 (Extreme Fear), sentiment specialists begin scoring long setups more favorably—the crowd is usually wrong at extremes.
- Weakness: Social media data is noisy and easily manipulated. The system weights sentiment data at only 10-15% of the total signal score to limit exposure to this noise.
Agent Parameters: Diversity by Design
Within each archetype, individual agents are differentiated by parameter variations. The V6 engine's configurable parameters allow for a wide range of agent "personalities." Here is a sample of how parameters vary across agents:
| Parameter | Conservative Agent | Default (V6) | Aggressive Agent |
|---|---|---|---|
| RSI Range | 35-65 | 30-70 | 25-75 |
| EMA Fast / Slow | 10 / 30 | 20 / 50 | 30 / 100 |
| SL ATR Multiplier | 1.5x | 2.0x | 2.5x |
| Volume Min Ratio | 0.8x | 0.5x | 0.3x |
| Cooldown Bars (5M) | 12 (60 min) | 6 (30 min) | 3 (15 min) |
| Expansion ATR Mult | 2.2x | 1.8x | 1.5x |
| Retest Tolerance | 0.15x ATR | 0.25x ATR | 0.40x ATR |
| Target Focus | TP1-TP2 | TP2-TP3 | TP3-TP4 |
This parametric diversity ensures that the swarm does not simply echo a single strategy's opinion. Conservative agents require stricter confirmation before signaling, while aggressive agents activate on weaker setups. When both agree, the signal is robust.
The Consensus Engine
Individual agent decisions are binary: each agent either signals an entry (long or short) or stays flat. The consensus engine aggregates these individual decisions into a composite signal with an associated confidence score.
How Consensus Forms
The process follows a strict sequence:
- BOS Regime Detection (15M): The engine processes 15-minute candlestick data to identify pivot highs and pivot lows using a 2-bar lookback window. When price closes above the last swing high, a bullish BOS is declared. When price closes below the last swing low, a bearish BOS is declared. This sets the regime for all agents.
- Setup Scanning (5M): On each new 5-minute candle close, agents scan for two types of entry setup:
- Pullback to EMA(20): Price pulls back to touch the 20-period EMA, then closes back in the regime direction. For bullish: low touches EMA(20), close is above it and above EMA(50).
- BOS Retest: After a breakout, price retests the broken structural level. The retest tolerance is 0.25x ATR from the BOS level.
- Filter Application: Each agent applies its own filter criteria:
- RSI must be within acceptable range (default 30-70)
- No active impulse move (rolling 2-bar range below expansion threshold)
- First pullback after expansion is skipped (forbid_first_pullback)
- Volume must exceed minimum ratio vs. 20-period SMA (default 0.5x)
- 1-hour trend must be aligned with signal direction
- Cooldown period must have elapsed since last signal (default 6 bars = 30 minutes)
- Vote Aggregation: Agents that pass all filters cast a directional vote. The consensus score is the percentage of active agents voting in the same direction.
- Confidence Assignment: Consensus percentage maps to a confidence score (0-100). Above 70% consensus triggers a high-confidence signal. Below 30% signals caution. The 30-70% range triggers escalation to premium analysis.
The Cascade Analysis Pattern
Not all signals warrant the same depth of analysis. Ironbrand uses a cascade pattern that optimizes both accuracy and computational cost:
The cascade operates across four analysis modes, selectable based on signal importance:
| Mode | How It Works | Cost | Best For |
|---|---|---|---|
cascade |
Economy LLM first, escalate to premium if confidence is 30-70% | Low-Medium | Default operation |
consensus |
Query 2-3 providers, majority vote decides | High | High-value signals |
best |
Use the highest-tier provider available (GPT-4o, Claude) | High | Critical decisions |
cheapest |
Use the lowest-cost provider only | Minimal | Screening & filtering |
Multi-Provider LLM Voting
One of the most distinctive features of Ironbrand's swarm architecture is that the AI analysis layer itself is multi-agent. Rather than trusting a single AI model, the system can query multiple large language models from different providers and aggregate their assessments.
Supported Providers
| Provider | Model | Tier | Cost (per 1M tokens) | Strength |
|---|---|---|---|---|
| OpenAI | GPT-4o | Premium | $2.50 in / $10.00 out | Broad reasoning, nuanced context |
| Anthropic | Claude Sonnet | Premium | $3.00 in / $15.00 out | Careful analysis, risk assessment |
| DeepSeek | R1 (Reasoner) | Standard | $0.55 in / $2.19 out | Deep reasoning at low cost |
| DeepSeek | V3 (Chat) | Economy | $0.14 in / $0.28 out | Ultra-fast screening |
In consensus mode, the system queries up to three providers simultaneously. Each provider receives identical context: the raw signal data (direction, entry, stop-loss, take-profit levels, ATR, RSI, BOS regime, volume ratio, 1-hour trend alignment), the full market context (Fear & Greed, funding rates, open interest, liquidation ratios, BTC dominance, social sentiment), the geopolitical context (GDELT tone, CryptoPanic sentiment, Polymarket risk scores), and the last 15 five-minute candles in summary format.
Each provider returns a structured JSON response:
{
"approved": true,
"confidence": 78,
"direction_bias": "long",
"reasoning": "BOS bullish confermato con pullback EMA20 pulito.
RSI a 45 neutro, funding negativo suggerisce
short crowding — setup contrarian favorevole."
}
The consensus engine then applies majority voting: if 2 out of 3 providers approve the signal, it passes. The average confidence across providers becomes the final confidence score. If providers disagree on direction, the signal is flagged as contested and requires manual review or is automatically downgraded.
Signal Output: What the Swarm Produces
When consensus is reached, the swarm produces a complete signal object containing every data point needed for execution:
{
"direction": "long",
"entry": 87450,
"sl": 86050, // ATR * 2.0 below entry
"tp1": 88570, // 0.8R above entry
"tp2": 89410, // 1.4R above entry
"tp3": 90250, // 2.0R above entry
"tp4": 91090, // 2.6R above entry
"atr": 700.00,
"regime": "bull", // BOS regime on 15M
"reason": "pullback_ema20",
"rsi": 44.2,
"vol_ratio": 1.35, // volume is 1.35x the 20-period average
"trend_1h": "aligned",
"extreme_vol": false,
"confidence": 78,
"consensus": "3/3 approved",
"market_bias": "long (strength: +3/5)"
}
The four take-profit levels use fixed risk multiples derived from the stop-loss distance (risk = entry - SL for longs). TP1 at 0.8R is designed for quick partial profit-taking. TP2 at 1.4R is the primary target. TP3 at 2.0R represents a full trend move. TP4 at 2.6R is the extended target for strong trends. This tiered exit structure is inspired by professional prop trading firms that scale out of positions rather than using single exits.
Volatility Adaptation
Markets do not have a single personality. Periods of low volatility (compressed ATR, narrow ranges) behave fundamentally differently from high-volatility environments (expanded ATR, large candles, cascading liquidations). The swarm adapts its behavior in real time based on measured volatility conditions.
Extreme Volatility Detection
The V6+ engine continuously compares the current 14-period ATR against its own 50-bar average. When the current ATR exceeds the average by more than 2.5x (the extreme_vol_mult parameter), the system enters extreme volatility mode:
- Stop-loss widening: In extreme volatility, stops are calculated using the
sl_atr_mult_extremeparameter (default 2.0x) instead of the standard multiplier. This prevents premature stop-outs during whipsaw events. - Agent reweighting: Trend follower agents gain weight while mean-reversion agents are suppressed. In extreme volatility, trends tend to overshoot rather than revert.
- Cooldown extension: The post-signal cooldown period (default 6 bars = 30 minutes) prevents the system from generating rapid-fire signals during chaotic conditions.
Expansion Detection
Individual candles that exceed 1.8x the 14-period ATR are classified as "expansion" candles. These represent significant institutional activity or news-driven moves. When an expansion candle is detected:
- The expansion state becomes active and persists for up to 30 bars (150 minutes on the 5-minute chart)
- The first pullback after expansion is deliberately skipped (
forbid_first_pullback)—this initial retracement is often a continuation trap - Subsequent pullbacks within the expansion window are eligible for entry if all other filters pass
The Role of Each Data Layer in Agent Scoring
Each agent archetype weights the three data layers differently. The following breakdown shows how a typical signal flows through the full system:
| Data Layer | Trend Follower | Mean Reversion | Breakout | Sentiment |
|---|---|---|---|---|
| Technical (BOS, EMA, RSI) | 50% | 40% | 60% | 20% |
| Market Context (F&G, funding) | 30% | 35% | 25% | 30% |
| Geopolitical (GDELT, news) | 10% | 10% | 5% | 30% |
| On-Chain | 10% | 15% | 10% | 20% |
Graceful Degradation: When Data Sources Fail
In production, data sources fail. APIs rate-limit. Exchanges go down. The swarm is designed to continue operating with reduced confidence rather than halting entirely.
Every data source in the system implements an independent cache with configurable TTL (Time-To-Live):
- Funding rates: 5-minute cache. If the API fails, the last known value is used.
- Fear & Greed: 30-minute cache. The index updates daily, so stale data remains valid for hours.
- GDELT tone: 30-minute cache with 6-second inter-request delay to respect rate limits. HTTP 429 responses gracefully fall back to cached values.
- CryptoPanic: 15-minute cache. If the API key is invalid or the service is down, the system falls back to parsing the public RSS feed.
- Polymarket: 10-minute cache. Prediction market data changes slowly enough that 10-minute-old data remains actionable.
- Open Interest / Liquidations: 10-minute and 5-minute caches respectively.
If a data source returns stale data, agents that heavily weight that source automatically reduce their influence on the consensus score. The system never crashes due to a single data source failure—it degrades gracefully, adjusting confidence levels to reflect the reduced information available.
Why Swarm Intelligence Beats Single Models
Traditional algorithmic trading systems rely on a single strategy or model. When market conditions change—as they inevitably do—these systems break. A trend-following algorithm that performs brilliantly during a bull run gets destroyed during a ranging market. A mean-reversion strategy that profits from choppy markets hemorrhages capital during a strong trend.
Swarm intelligence solves this through three mechanisms:
- Diversity of opinion: Different agent archetypes naturally disagree during ambiguous market conditions. This disagreement is information—it tells the system that conditions are unclear and position sizes should be reduced or entries should be delayed.
- Adaptive weighting: The system does not treat all agents equally. During trending markets (confirmed BOS regime, aligned 1-hour trend), trend-following agents carry more weight. During ranging markets (no BOS, neutral regime), mean-reversion agents gain influence.
- Multi-model AI validation: Even at the LLM analysis layer, the system queries multiple AI models from different providers. Each model has different training data, different architectures, and different biases. When GPT-4o, Claude, and DeepSeek R1 all agree on a signal assessment, the probability of collective error is dramatically lower than relying on any single model.
Real-Time Operation
The swarm operates continuously in a scan loop that executes on each new 5-minute candle close. The complete cycle—from raw candle data to final consensus signal—typically completes in under 3 seconds for cascade mode and under 10 seconds for full consensus mode.
Each scan cycle:
- Fetches fresh 5-minute, 15-minute, and 1-hour candlestick data from the exchange
- Updates the BOS engine state on the 15-minute timeframe
- Calculates all technical indicators (RSI, EMA, ATR, volume SMA) on the 5-minute data
- Evaluates entry conditions across all agent variants
- If a setup is detected, collects fresh market context data (Fear & Greed, funding rates, liquidations, sentiment)
- Collects geopolitical context (GDELT, CryptoPanic, Polymarket)
- Passes the complete data package to the LLM analysis layer
- Aggregates the multi-agent consensus and produces the final signal
Signals that pass all layers are logged to a persistent signal journal with full metadata: timestamp, direction, entry/exit levels, all indicator values, market context snapshot, LLM reasoning, and the final confidence score. This journal enables continuous backtesting and strategy refinement against historical decisions.
Conclusion
Ironbrand's swarm intelligence is not a marketing concept. It is a concrete engineering architecture built on three real layers of analysis: a V6+ technical signal engine with BOS detection, multi-timeframe confirmation, and six independent filters; a market context layer aggregating data from six macro sources with graceful degradation; and a multi-provider LLM analysis layer that uses cascade, consensus, or direct modes to validate every signal.
The result is a system that generates high-conviction signals backed by the agreement of diverse analytical perspectives—not the confidence of a single model in a single market condition. When the swarm speaks with one voice, the market tends to listen.