← Back to Intelligence

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.

Level 1: Technical Signal Engine (V6+)
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.
Level 2: Market Context Layer
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.
Level 3: LLM Analysis & Multi-Agent Consensus
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.

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.

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.

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.

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.

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:

  1. 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.
  2. 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.
  3. 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)
  4. 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.
  5. 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:

Economy First, Premium if Uncertain: When a signal is generated, it first passes through an economy-tier LLM (such as DeepSeek V3, at $0.14/1M input tokens). If this analysis returns high confidence (above 70%) or low confidence (below 30%), the decision is accepted. If the result falls in the uncertain middle range (30-70%), the signal escalates to a premium-tier LLM (GPT-4o or Claude) for deeper analysis. This cascade reduces analysis costs by 60-80% while maintaining premium-level accuracy on ambiguous signals.

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:

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 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):

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:

The Core Insight: Markets are complex adaptive systems. No single model can capture all their dynamics. By running a diverse population of agents with different strategies, different parameters, and different data weightings, and requiring consensus before acting, Ironbrand's swarm intelligence produces signals that are robust across market conditions—not optimized for any single regime.

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:

  1. Fetches fresh 5-minute, 15-minute, and 1-hour candlestick data from the exchange
  2. Updates the BOS engine state on the 15-minute timeframe
  3. Calculates all technical indicators (RSI, EMA, ATR, volume SMA) on the 5-minute data
  4. Evaluates entry conditions across all agent variants
  5. If a setup is detected, collects fresh market context data (Fear & Greed, funding rates, liquidations, sentiment)
  6. Collects geopolitical context (GDELT, CryptoPanic, Polymarket)
  7. Passes the complete data package to the LLM analysis layer
  8. 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.