NEXUS Protocol
1 / 13
THE NEXUS
PROTOCOL
AI Trading Algorithm · 13 Chapters
Trinity Intelligence Network
Built by Oracle. Proven in Production.

THE NEXUS PROTOCOL

The complete framework for building an AI-powered trading system. 13 chapters of real prompts, real architecture, and the exact system running in production.
$149
> 13 Chapters — Real Prompts, Real System
> Immediate Access After Purchase
> The Exact AI Trading System Behind NEXUS
BEST EXPERIENCE
Open this on your computer or MacBook so you can copy-paste prompts directly into Claude.

The Awareness Doctrine

Before we talk about signals, algorithms, or exchange APIs, we need to talk about something more fundamental. The reason most people fail with AI trading systems has nothing to do with the code. It has everything to do with awareness.

This system was not built by copying indicators from a textbook. It was built through hundreds of hours of watching markets, understanding why certain patterns repeat, and translating that understanding into prompts that an AI can execute. The prompts carry the awareness of the person who wrote them.

"AI trades at the level of the operator's awareness. Give it shallow prompts, it makes shallow trades. Give it prompts that encode real market understanding, it executes with that understanding embedded in every decision."

This is the single most important concept in this entire course. The difference between this system and every other trading bot tutorial on the internet is not the code. The code is similar. The difference is what the code is built on top of: a layered awareness framework that understands why signals work, when they fail, and how to adapt when market conditions change.

When you copy-paste the prompts from Chapter 8, you are not just copying code. You are copying the reasoning, the edge cases, the market philosophy, and the risk management framework that Oracle built through real trading. That is consciousness transfer. That is why this system works when others don't.

What This Means for You

As you go through each chapter, don't skip the explanations. Don't jump straight to the prompts. The explanations are why the prompts work. If you understand the reasoning, you can modify the system. If you don't, you're just running someone else's black box — and when market conditions shift, you won't know how to adapt.

Read every chapter. Understand every concept. Then build.

Read this chapter
Understand why awareness matters more than code. The prompts carry the operator's understanding — that's the edge.

What This System Is

The NEXUS Protocol is an autonomous AI trading system designed for leveraged perpetual futures on Hyperliquid. It combines three layers that work together to find trades, execute them, manage risk, and evolve over time.

The Three Layers

Layer 1: The Signal Engine

35 quantitative signals across five categories — momentum, trend, volume, volatility, and market structure. Each signal is scored 0-100. The composite score determines whether to enter a trade. Backtested across 4,500 parameter combinations to find optimal thresholds.

Layer 2: The Trailing Stop Algorithm

No fixed take-profit. The trailing stop follows price upward, locking in gains dynamically based on ATR (Average True Range). Three modes — tight for scalps, normal for swings, wide for trends. This is the core innovation that lets winners run while cutting losses.

Layer 3: Claude as Intelligence

Claude is the brain. It receives market data, runs the signal analysis, makes the entry/exit decisions, manages position sizing, and outputs structured trade logs. The prompts are designed to make Claude think like a systematic trader, not a chatbot.

What Makes It Different

This is not a black box. Every signal is documented. Every threshold is explained. Every decision point is transparent. You can read the logic, understand why it works, and modify it to match your risk tolerance and trading style.

The system also includes a live dashboard for real-time position tracking, P&L visibility, and system health monitoring. You see everything the bot sees. You know exactly why it entered, where its stop is, and what would trigger an exit.

And critically, the system is designed to evolve. Chapter 12 covers the feedback loop: trade results go back into Claude, which analyzes performance, identifies weaknesses, and suggests parameter adjustments. The system gets smarter over time — not through magic, but through systematic performance review.

Full Transparency
Every component of this system is explained in plain language. There is no hidden sauce. The edge is in the combination of signals, the trailing stop logic, and the awareness encoded in the prompts. You get all of it.
Understand the three-layer architecture
Signal Engine + Trailing Stop + Claude Intelligence. Each layer has a specific job. Together they form the complete system.

Risk, Reality, Disclaimers

This chapter exists because honesty matters more than hype. Before you touch a single line of code, you need to understand what you are walking into.

// Critical Risk Disclosure
Leveraged perpetual futures trading can result in the complete loss of your capital. This is not a theoretical risk. It happens to real people every day. The NEXUS Protocol is educational material — it is not financial advice, investment advice, or a solicitation to trade. You are solely responsible for your trading decisions and their outcomes.

The Reality of Algorithmic Trading

This system lost money before it made money. That is not a disclaimer buried in fine print — it's the truth of how algorithmic trading works. The first iterations had the wrong signal thresholds. The trailing stop was too tight in volatile markets. Position sizing was too aggressive. Each of these mistakes cost real money.

The system you are receiving is the result of those losses being analyzed, understood, and corrected. But that does not mean it won't lose money for you. Markets change. Conditions shift. What worked last month may underperform next month.

Rules You Must Follow

  • Never trade money you cannot afford to loseIf losing your trading capital would affect your rent, food, or mental health — do not trade with it. Period.
  • Start with simulationChapter 10 covers paper trading. Run at least 30 simulated trades before putting real money on the line. No exceptions.
  • Start small when going liveYour first real trades should use minimum position sizes. Scale up only after consistent results over weeks, not days.
  • Past performance guarantees nothingBacktested results do not reflect real-world slippage, latency, or liquidity conditions. Live results will differ from simulation.
  • This is educational, not advisoryConsult a licensed financial advisor before trading. This course teaches you how to build a system — it does not tell you to trade.
"The best traders are not the ones who never lose. They are the ones who manage their losses so methodically that the wins compound over time. Risk management is not a chapter — it is the foundation beneath every chapter."

If you're reading this and feeling cautious, good. Caution is the correct emotional response to leveraged trading. This system is designed to be methodical and disciplined precisely because the market does not care about your feelings.

Accept the risk reality
Understand that losses are part of the process. Never trade money you cannot afford to lose. Start with simulation.

The Signal Engine

The Signal Engine is the analytical core of the NEXUS Protocol. It processes market data through 35 quantitative indicators, organized into five categories. Each indicator outputs a score from 0 to 100. The composite score across all indicators determines whether the system enters a trade.

The Five Signal Categories

1. Momentum Signals (7 indicators)

RSI (Relative Strength Index), MACD (Moving Average Convergence Divergence), Stochastic Oscillator, Stochastic RSI, Rate of Change, Williams %R, Commodity Channel Index. These measure the speed and magnitude of price movement. When momentum aligns across multiple timeframes, the probability of continuation increases.

2. Trend Signals (7 indicators)

EMA 9/21 cross, EMA 21/50 cross, EMA 50/200 cross, ADX (Average Directional Index), Parabolic SAR, Ichimoku Cloud position, Aroon Oscillator. These identify the direction and strength of the prevailing trend. The system is designed to trade with the trend, not against it.

3. Volume Signals (7 indicators)

OBV (On-Balance Volume), VWAP deviation, Volume Delta, Volume Moving Average ratio, Accumulation/Distribution, Money Flow Index, Chaikin Money Flow. Volume confirms price movement. A breakout on low volume is suspicious. A breakout on high volume is conviction.

4. Volatility Signals (7 indicators)

ATR (Average True Range), Bollinger Band width, Bollinger %B, Keltner Channel position, Standard Deviation, Historical Volatility ratio, Volatility contraction/expansion. These determine position sizing and trailing stop distance. High volatility means wider stops and smaller positions. Low volatility means tighter stops and larger positions.

5. Market Structure Signals (7 indicators)

Support/Resistance proximity, Order book imbalance, Funding rate, Open interest change, Liquidation clusters, Relative volume to average, Price action patterns (engulfing, pin bars, inside bars). These are the context signals — they tell you where you are in the market structure, not just what the indicators say.

Composite Signal Scoring

Each signal is scored 0 to 100. The composite score is a weighted average across all 35 signals. The weights are not equal — trend and volume signals carry more weight than momentum signals, because momentum can be noisy in ranging markets.

The entry threshold is calibrated through backtesting. The system tested 4,500 parameter combinations across multiple timeframes and market conditions to find the threshold that maximizes risk-adjusted returns while minimizing false signals.

Signal Scoring Logic
// Composite signal calculation (simplified)
const weights = {
  momentum: 0.15,   // 7 signals x 0.15 = lower weight (noisy)
  trend: 0.25,      // 7 signals x 0.25 = highest weight
  volume: 0.25,     // 7 signals x 0.25 = high weight
  volatility: 0.15, // 7 signals x 0.15 = sizing context
  structure: 0.20   // 7 signals x 0.20 = market context
};

// Entry when composite > threshold (calibrated via backtest)
// Default threshold: 68 (conservative)
// Aggressive threshold: 55 (more trades, lower win rate)
// Conservative threshold: 75 (fewer trades, higher win rate)
Why 35 Signals?
No single indicator is reliable on its own. RSI can stay overbought for weeks in a strong trend. MACD lags in fast-moving markets. Volume can be manipulated. By combining 35 signals across 5 categories, the system builds a consensus view. Individual signals can be wrong. The consensus rarely is.
Understand the 35-signal framework
Five categories, weighted scoring, composite threshold. No single signal makes a decision — consensus does.

The Trailing Stop

The trailing stop is the core innovation of the NEXUS Protocol. Most trading systems use fixed take-profit levels: enter at $100, exit at $105. The problem with fixed TP is obvious — you cap your upside. If the price runs to $120, you still exited at $105.

The trailing stop eliminates this problem. There is no profit cap. The stop follows the price upward, locking in gains as the trade moves in your favor. When the price eventually reverses, the stop triggers and you exit with whatever profit the market gave you.

How It Works

The trailing stop distance is dynamic, based on ATR (Average True Range). ATR measures how much a price typically moves in a given period. In volatile markets, ATR is high — so the trailing stop is wider, giving the trade room to breathe. In calm markets, ATR is low — so the trailing stop is tighter, protecting gains more aggressively.

Trailing Stop Algorithm
// The Trailing Stop Algorithm
// 1. On entry: set initial stop at entry_price - (ATR * multiplier)
// 2. On each new candle:
//    a. If current_price > peak_price: update peak_price
//    b. Calculate new_stop = peak_price - (ATR * multiplier)
//    c. If new_stop > current_stop: move stop UP to new_stop
//    d. Stop NEVER moves down (ratchet mechanism)
// 3. Exit when: current_price <= trailing_stop

// Three modes:
// TIGHT  (scalp):  multiplier = 1.5  // exits fast, captures small moves
// NORMAL (swing):  multiplier = 2.5  // balanced risk/reward
// WIDE   (trend):  multiplier = 4.0  // lets trends run, wider drawdown

// Example (NORMAL mode):
// Entry: $100, ATR: $2
// Initial stop: $100 - ($2 * 2.5) = $95.00
// Price moves to $108, ATR: $2.1
// New stop: $108 - ($2.1 * 2.5) = $102.75
// Price reverses to $102.75 -> EXIT with $2.75 profit per unit

Why This Beats Fixed Take-Profit

  • No profit cap. In a strong trend, the trailing stop rides the entire move. Fixed TP exits too early.
  • Adaptive to volatility. The ATR-based distance adjusts automatically. You don't need to manually set different TP levels for different market conditions.
  • Ratchet mechanism. The stop only moves up, never down. Once a profit level is locked in, it stays locked.
  • Works across timeframes. The same algorithm works on 5-minute scalps and 4-hour swings — the ATR value adjusts naturally.

Choosing the Right Mode

Tight mode is for high-frequency scalping. It captures small moves quickly but gets stopped out more often in choppy markets. Best for ranging, sideways markets where moves are small and reversals are frequent.

Normal mode is the default. It balances risk and reward for swing trading on 1-hour to 4-hour timeframes. Most of the system's testing was done in this mode.

Wide mode is for trend following. It survives deep pullbacks but requires patience. Best for strong trending markets where you want to capture multi-day moves.

Oracle's Recommendation
Start with Normal mode. After 30+ simulated trades, you will have enough data to know if your market conditions favor Tight or Wide. Do not switch modes based on a handful of trades — that's noise, not signal.
Understand the trailing stop mechanism
ATR-based, three modes, ratchet mechanism. No fixed TP — let winners run, cut losses with discipline.

Exchange Integration

Hyperliquid is the execution layer. The NEXUS Protocol uses Hyperliquid for several reasons, and understanding those reasons matters because the exchange you choose directly affects your system's performance.

Why Hyperliquid

  • Low feesMaker rebates and low taker fees mean your edge isn't eaten by transaction costs. On high-frequency strategies, fees can be the difference between profitable and unprofitable.
  • Fast executionSub-second order fills. When the signal engine says "enter now," you need the exchange to respond immediately. Latency kills alpha.
  • API-first designHyperliquid's API is clean, well-documented, and built for programmatic trading. No rate limit headaches at normal trading volumes.
  • DecentralizedSelf-custody of funds. No centralized exchange risk. Your assets stay in your wallet until a trade is executed.

API Key Setup

You will need to generate API keys from your Hyperliquid account. The system requires trade and read permissions. Never enable withdraw permissions on API keys used by bots. If your system is compromised, the attacker can trade (which is bad) but cannot withdraw your funds (which would be worse).

API Configuration
// Store in .env file — NEVER commit to git
HYPERLIQUID_API_KEY=your_api_key_here
HYPERLIQUID_API_SECRET=your_api_secret_here

// Permissions required:
// - Read: market data, positions, balances
// - Trade: place orders, modify orders, cancel orders
// - Withdraw: NEVER enable this for bot API keys

The Execution Flow

The system follows a strict execution pipeline for every potential trade:

  1. Signal: The 35-signal engine produces a composite score above threshold
  2. Validate: Check position limits, available margin, and market conditions
  3. Size: Calculate position size based on account balance and risk percentage
  4. Enter: Place limit order at calculated entry price
  5. Manage: Set initial trailing stop, monitor position
  6. Exit: Trailing stop triggers, position closed, trade logged

Every step is logged. Every order is tracked. If something fails at any step, the system handles the failure gracefully — no orphaned positions, no unmanaged risk.

Security Warning
Never share your API keys. Never commit them to GitHub. Never paste them in chat. Store them in a .env file that is in your .gitignore. If you suspect your keys have been exposed, revoke them immediately and generate new ones.
Understand the exchange integration
Hyperliquid for execution. API keys with trade+read only. Six-step execution pipeline with full logging.

Wallet & Funding

Before you can trade, you need a funded wallet on Hyperliquid. This chapter walks through the wallet setup, funding process, and security practices you should follow from day one.

Wallet Architecture

Use a two-wallet approach for security:

Cold Wallet (Storage)

A hardware wallet (Ledger, Trezor) that holds the majority of your crypto. This wallet never interacts with the trading bot. Think of it as your savings account — funds go in, and they only come out when you deliberately move them to the hot wallet.

Hot Wallet (Trading)

A browser wallet (MetaMask or equivalent) connected to Hyperliquid. This wallet holds only what you intend to trade. If the worst happens and this wallet is compromised, you lose your trading capital — not your savings.

Funding Process

  1. Acquire USDC on Arbitrum (Hyperliquid's settlement chain)
  2. If your USDC is on another chain, bridge it to Arbitrum using the official bridge or a reputable bridging service
  3. Connect your hot wallet to Hyperliquid
  4. Deposit USDC from your Arbitrum wallet to Hyperliquid
  5. Verify the deposit appears in your Hyperliquid balance

How Much to Start With

The recommended starting capital depends on your goals and risk tolerance. Here is a framework:

Minimum Viable Capital

$500 USDC. This allows you to run the system at minimum position sizes (1-2% risk per trade). You won't get rich, but you'll learn how the system behaves with real money on the line — which is a fundamentally different experience from simulation.

Recommended Starting Capital

$2,000-$5,000 USDC. This gives you enough room for proper position sizing across multiple trading pairs. You can run the system as designed without being constrained by minimum order sizes.

The Golden Rule
Whatever amount you deposit should be money you can afford to lose completely. Not "lose and be sad." Lose and your life doesn't change. If that number is $500, trade with $500. If it's $50, trade with $50. The system works at any scale.
Set up your wallet architecture
Two wallets (cold + hot). Fund via USDC on Arbitrum. Only deposit what you can afford to lose.

The Prompt Sequences

This is the chapter where theory becomes execution. Every prompt below is copy-paste ready. Feed them into Claude Code and the system builds itself. But remember Chapter 1 — the prompts work because they encode awareness. Read each one before you paste it.

Prompt 1: Signal Engine

This prompt instructs Claude to build the complete 35-signal analysis engine. It defines each indicator, the scoring system, the weights, and the composite threshold.

Signal Engine Prompt
Build a quantitative signal analysis engine in TypeScript.

The engine analyzes market data through 35 indicators across 5 categories:
- Momentum (7): RSI, MACD, Stochastic, StochRSI, ROC, Williams %R, CCI
- Trend (7): EMA 9/21, EMA 21/50, EMA 50/200, ADX, SAR, Ichimoku, Aroon
- Volume (7): OBV, VWAP deviation, Volume Delta, Vol MA ratio, A/D, MFI, CMF
- Volatility (7): ATR, BB Width, BB %B, Keltner position, StdDev, HV ratio, Vol expansion
- Structure (7): S/R proximity, Order book imbalance, Funding rate, OI change,
  Liquidation clusters, Relative volume, Price action patterns

Each indicator scores 0-100 (0 = strong bearish, 50 = neutral, 100 = strong bullish).

Category weights: momentum=0.15, trend=0.25, volume=0.25, volatility=0.15, structure=0.20

The composite score is the weighted average across all 35 signals.
Entry signal triggers when composite > configurable threshold (default: 68).

Export a function: analyzeSignals(candles: Candle[], orderbook?: OrderBook) => SignalResult
SignalResult includes: composite score, category breakdowns, individual signal scores,
signal direction (LONG/SHORT/NEUTRAL), confidence level, timestamp.

Use ccxt for market data fetching. All calculations must be pure functions.
Include unit tests for each indicator using known historical data snapshots.

Prompt 2: Trailing Stop System

Trailing Stop Prompt
Build a trailing stop management system in TypeScript.

The trailing stop is ATR-based with three modes:
- TIGHT (multiplier: 1.5) - for scalps, exits quickly
- NORMAL (multiplier: 2.5) - balanced, default mode
- WIDE (multiplier: 4.0) - for trend following, survives pullbacks

Algorithm:
1. On position open: set stop = entry_price - (ATR * multiplier) for LONG
   (inverted for SHORT)
2. Track peak_price (highest price since entry for LONG)
3. On each candle close:
   a. Update peak_price if current > peak
   b. new_stop = peak_price - (ATR * multiplier)
   c. If new_stop > current_stop: update stop (ratchet - never moves backward)
4. Exit when price crosses below trailing stop (LONG) or above (SHORT)

The system must:
- Log every stop adjustment with timestamp, old stop, new stop, reason
- Calculate unrealized P&L at every update
- Support both LONG and SHORT positions
- Handle edge cases: gaps, exchange outages, reconnection
- Store stop state persistently (survive bot restarts)

Export: TrailingStopManager class with methods:
  openPosition(entry, side, atr, mode) => StopState
  updateStop(currentPrice, currentATR) => StopUpdate | null
  shouldExit(currentPrice) => boolean
  getState() => StopState

Prompt 3: Exchange Connector

Exchange Connector Prompt
Build a Hyperliquid exchange connector in TypeScript using their SDK.

The connector must support:
- Authentication via API key/secret from .env
- Fetching OHLCV candles (1m, 5m, 15m, 1h, 4h timeframes)
- Fetching current orderbook (depth 20)
- Placing limit orders (entry)
- Placing stop-market orders (trailing stop)
- Modifying existing stop orders (for trailing stop updates)
- Canceling orders
- Fetching current positions
- Fetching account balance and margin

Error handling requirements:
- Retry with exponential backoff on network errors (max 3 retries)
- Rate limit management (track and respect exchange limits)
- Graceful degradation on partial failures
- Structured logging for every API call (request, response, latency)

Security requirements:
- API keys loaded from environment variables only
- Never log API keys or secrets
- Validate API key permissions on startup

Export: HyperliquidConnector class with typed methods for each operation.
Include integration tests that run against testnet.

Prompt 4: Dashboard

Dashboard Prompt
Build a real-time trading dashboard as a single HTML file with inline CSS and JS.

The dashboard displays:
- Current position: entry price, current price, unrealized P&L, trailing stop level
- Signal engine status: composite score, individual category scores, last signal time
- Trade history: last 20 trades with entry/exit, P&L, duration, signal that triggered
- Account: balance, total P&L, win rate, average R, max drawdown, Sharpe ratio
- System health: connection status, last heartbeat, errors in last hour

Visual style: dark theme (#030308 background), cyan (#00d4ff) accent color,
monospace fonts for data, clean grid layout.

The dashboard polls a local API endpoint every 5 seconds for updates.
All data is rendered client-side from JSON responses.
Include a manual kill switch button that sends a POST to /api/kill to flatten all positions.

Mobile responsive with single-column layout on phones.
No external dependencies — pure HTML/CSS/JS.
"These prompts are not magic. They are precise instructions that encode specific market understanding. The reason they produce a working system is that every requirement, every edge case, every architectural decision is explicitly stated. That is the difference between prompting and commanding."
Read and understand all four prompts
Signal Engine, Trailing Stop, Exchange Connector, Dashboard. Each prompt is copy-paste ready but read them first — understand what you're building.

Bot Configuration

With all four components built (Signal Engine, Trailing Stop, Exchange Connector, Dashboard), you need to configure how they work together. The configuration file is the control panel of your trading system.

The Configuration File

config.json
{
  "trading": {
    "pairs": ["BTC-PERP", "ETH-PERP"],
    "timeframe": "1h",
    "signalThreshold": 68,
    "maxOpenPositions": 2,
    "positionSizePercent": 2.0,
    "maxLeverage": 5,
    "trailingStopMode": "NORMAL"
  },
  "risk": {
    "maxDrawdownPercent": 15,
    "maxDailyLossPercent": 5,
    "maxPositionSizeUSD": 5000,
    "cooldownAfterLoss": 3600
  },
  "execution": {
    "slippageTolerancePercent": 0.1,
    "orderTimeout": 30,
    "retryAttempts": 3
  },
  "monitoring": {
    "dashboardPort": 3847,
    "healthCheckInterval": 60,
    "alertOnDrawdown": 10,
    "logLevel": "info"
  }
}

Key Parameters Explained

  • signalThreshold: 68The composite score required to trigger a trade. Higher = fewer trades, higher win rate. Lower = more trades, lower win rate. 68 is the optimized default from backtesting.
  • positionSizePercent: 2.0Risk 2% of account balance per trade. A $5,000 account risks $100 per trade. This is conservative by design — it means you can take 50 consecutive losses before your account is zeroed.
  • maxLeverage: 5Maximum 5x leverage. Hyperliquid allows much higher, but higher leverage amplifies losses as much as gains. 5x is the ceiling, not the default.
  • maxDrawdownPercent: 15If the account drops 15% from its peak, the bot stops trading and sends an alert. This is the circuit breaker — it prevents catastrophic loss spirals.
  • cooldownAfterLoss: 3600After a losing trade, the bot waits 1 hour (3600 seconds) before taking another trade. This prevents revenge trading — the bot equivalent of going on tilt.

Presets

Conservative Preset (Beginners)

Signal threshold: 75, position size: 1%, max leverage: 3x, trailing stop: NORMAL, max positions: 1. Fewer trades, higher quality, lower risk. Start here.

Balanced Preset (Default)

Signal threshold: 68, position size: 2%, max leverage: 5x, trailing stop: NORMAL, max positions: 2. The configuration the system was optimized for.

Aggressive Preset (Experienced)

Signal threshold: 55, position size: 3%, max leverage: 7x, trailing stop: TIGHT, max positions: 3. More trades, higher risk, requires active monitoring. Not recommended for beginners.

Start Conservative
If you are new to algorithmic trading, use the Conservative preset. You can always increase risk later. You cannot undo losses from starting too aggressively.
Configure your bot
Choose a preset that matches your experience level. Start conservative, adjust after 30+ trades.

Simulation First

You do not go live until you have completed at least 30 simulated trades. This is not optional. This is not a suggestion. This is a requirement that separates disciplined traders from gamblers.

Running in Simulation Mode

The system includes a simulation mode that uses live market data but executes trades on paper. Everything behaves exactly like live trading — signals fire, entries are logged, trailing stops are managed, exits are recorded — except no real orders are placed on the exchange.

Start in Simulation
// In your config.json, set:
{
  "execution": {
    "mode": "SIMULATION",  // Change to "LIVE" when ready
    "paperBalance": 5000   // Simulated starting balance in USDC
  }
}

// The bot runs identically in both modes.
// The only difference: SIMULATION mode skips the exchange API calls.
// All signals, stops, and P&L calculations are real.

What to Measure

After 30+ trades, evaluate these metrics:

  • Win RatePercentage of trades that are profitable. The system targets 55-65%. Below 50% consistently means something is misconfigured.
  • Average R (Risk-Reward)Average profit on winners divided by average loss on losers. Target: 1.5R or higher. This means winners are 1.5x larger than losers on average.
  • Max DrawdownThe deepest trough from a peak in your equity curve. If max drawdown exceeds 15%, reduce position size or increase signal threshold.
  • Sharpe RatioRisk-adjusted return. Above 1.0 is acceptable. Above 2.0 is strong. Below 1.0 means the risk isn't being compensated with enough return.
  • Consecutive LossesThe longest losing streak. This tells you what the worst-case scenario feels like psychologically. If you can't handle 5 losses in a row emotionally, reduce your position size.

Red Flags

Stop and reassess if you see any of these during simulation:

  • Win rate below 45% after 30 trades
  • Average R below 1.0
  • Max drawdown exceeding 20%
  • More than 8 consecutive losses
  • The system trades excessively (more than 10 trades per day on 1h timeframe)

Any of these indicate a configuration issue, a market condition mismatch, or a signal engine problem. Go back to Chapters 4 and 9, adjust parameters, and run another 30 simulated trades.

"Simulation is not practice. Simulation is production without risk. If the system doesn't work in simulation, it will not work with real money. And if it does work in simulation, it still might not work with real money — but at least you've eliminated the obvious failures."
Complete 30+ simulated trades
Measure win rate, average R, max drawdown, and Sharpe ratio. Do not go live until metrics are acceptable.

Going Live

You have completed 30+ simulated trades. Your metrics are within acceptable ranges. You understand the risk. Now it's time to transition from simulation to live trading. This transition is where most people make mistakes, so follow this protocol exactly.

The Transition Protocol

  1. Start with minimum position size. Even if your simulation used 2% risk, start live with 0.5% risk. The psychological difference between paper and real money is enormous. Give yourself time to adjust.
  2. Trade one pair only. Even if your config has multiple pairs, start with one. BTC-PERP is the most liquid and predictable choice.
  3. Monitor actively for the first 5 trades. Watch the dashboard. Verify that entries, stops, and exits match what you saw in simulation. Confirm that fills are close to expected prices.
  4. Scale up gradually. After 10 profitable live trades at minimum size, increase to 1% risk. After another 10, move to your target risk level. This is not impatience — it's discipline.

What to Monitor in the First Week

  • SlippageThe difference between expected fill price and actual fill price. On liquid pairs like BTC-PERP, slippage should be minimal. If you're seeing more than 0.1% slippage consistently, something is wrong with order timing.
  • Fill ratePercentage of limit orders that get filled. If your fill rate is below 80%, your entry prices may be too aggressive. Adjust the entry offset in config.
  • API latencyTime between signal and order placement. Should be under 500ms. If consistently higher, check your network connection and server location.
  • Stop executionVerify that trailing stop adjustments are happening correctly. Check the logs for stop movements. Confirm exits trigger at the expected level.

Common First-Week Mistakes

  • Overriding the bot. You see a trade go negative and manually close it before the trailing stop triggers. This destroys the system's edge. If you don't trust the system, go back to simulation.
  • Changing config mid-trade. Never adjust signal thresholds, risk parameters, or trailing stop modes while the bot has open positions. Make changes when flat.
  • Watching every tick. The dashboard exists for periodic checks, not constant monitoring. Staring at real-time P&L creates emotional decisions. Check the dashboard 3-4 times per day, not 3-4 times per minute.
  • Going all-in after first win. One winning trade proves nothing. Stick to the scale-up protocol.
When to Intervene
The only time you should manually override the bot is if: (a) the exchange API is returning errors, (b) there's a catastrophic market event (exchange hack, flash crash), or (c) the system hits the max drawdown circuit breaker. For normal market moves — even large ones — let the system work.
Follow the live transition protocol
Minimum size first. One pair. Monitor for 5 trades. Scale up after 10 profitable trades. No overrides.

Evolving Your AI

A static trading system is a dying trading system. Markets evolve. Volatility regimes change. What worked in Q1 may underperform in Q3. The NEXUS Protocol is designed to evolve — and this chapter shows you how to feed the system's results back into Claude to make it smarter over time.

The Feedback Loop

The evolution process follows a four-step cycle:

  1. Trade: The system runs autonomously, generating trades and logging results.
  2. Analyze: At the end of each week, export the trade log and feed it to Claude with a performance review prompt.
  3. Adjust: Claude identifies patterns in winners and losers, suggests parameter changes, and highlights signals that underperformed.
  4. Implement: Update the configuration with Claude's recommendations, run another cycle.

The Performance Review Prompt

Weekly Review Prompt
Analyze this week's trading results for the NEXUS Protocol.

Trade log attached: [paste trade log JSON]

For each trade, I have: entry time, exit time, pair, direction, entry price,
exit price, position size, P&L, signal scores at entry, trailing stop mode,
max favorable excursion, max adverse excursion.

Please analyze:
1. Overall performance: win rate, average R, total P&L, Sharpe ratio
2. Which signal categories were most accurate this week?
3. Which signal categories had false signals? (high score but losing trade)
4. Were there missed opportunities? (high signals that weren't taken due to threshold)
5. Was the trailing stop mode appropriate? (Did NORMAL exit too early on trends?
   Did it hold too long on reversals?)
6. Position sizing: were any trades too large relative to the volatility?

Based on this analysis, recommend specific parameter adjustments:
- Signal threshold (up or down, and by how much)
- Category weights (which categories deserve more/less weight)
- Trailing stop mode (should we switch for current conditions?)
- Any signals that should be temporarily disabled

Be specific. Give me exact numbers, not vague suggestions.

The Weekly Evolution Ritual

Every Sunday, before markets open for the new week:

  • Export the previous week's trade log from the dashboard
  • Run the Performance Review prompt in Claude
  • Review Claude's recommendations critically — don't blindly accept every suggestion
  • If changes are warranted, update config.json
  • Document the changes in a changelog (what changed, why, expected impact)
  • Run 10 simulated trades with the new config to sanity-check
  • If simulation looks good, deploy the updated config for the new week

Signal Optimization Prompt

Signal Optimization Prompt
I want to optimize the signal weights for the NEXUS Protocol.

Here are the last 50 trades with full signal breakdowns at entry:
[paste signal data]

For each trade, determine:
1. Which individual signals were most predictive of the outcome?
2. Which signals consistently scored high on losing trades (false positives)?
3. Which signals scored low on winning trades that we almost missed?

Calculate the correlation between each signal category and trade outcome.
Recommend new category weights that maximize the predictive accuracy.

Current weights: momentum=0.15, trend=0.25, volume=0.25, volatility=0.15, structure=0.20
Recommend new weights. Explain the rationale for each change.
"The system doesn't get smarter by magic. It gets smarter because you feed it data, ask the right questions, and implement the answers methodically. Evolution is not random mutation — it is directed improvement through systematic analysis."
Understand the evolution framework
Trade, analyze, adjust, implement. Weekly review ritual. The system gets smarter through systematic performance analysis.

The Evolution Path

You now have a complete, functioning AI trading system. The Signal Engine analyzes markets. The Trailing Stop manages risk. The Exchange Connector executes trades. The Dashboard gives you visibility. And the evolution framework keeps the system improving over time.

This final chapter maps the road ahead. Where you go from here depends on your goals, your risk tolerance, and how deeply you want to build.

Level 1: Multi-Pair Expansion

The system currently runs on 1-2 trading pairs. The next step is expanding to 5-8 pairs. More pairs mean more opportunities, but also more complexity. Each pair has different volatility characteristics, different liquidity profiles, and different optimal parameters.

The approach: run each new pair in simulation for 30 trades before adding it to live. Don't assume that parameters optimized for BTC-PERP will work for SOL-PERP. They might. Test it.

Level 2: Multi-Timeframe Analysis

The current system analyzes one timeframe (1h by default). Multi-timeframe analysis adds depth: use the 4h chart for trend direction, the 1h chart for entry timing, and the 15m chart for precision entry. This reduces false signals because a trade must align across multiple timeframes.

The prompt for this is straightforward: instruct Claude to run the signal engine on three timeframes simultaneously and only enter when all three agree on direction.

Level 3: Sentiment Integration

Market data tells you what price is doing. Sentiment data tells you what traders are feeling. Funding rates, open interest changes, social media sentiment, and news events can all be incorporated as additional signal categories.

This is where the system starts to differentiate from pure technical analysis. A strong bullish signal combined with extreme negative funding rate (shorts are overleveraged) is a higher-conviction setup than bullish signals alone.

Level 4: Portfolio of Strategies

The ultimate evolution is running multiple strategies simultaneously. A trend-following strategy on 4h charts. A mean-reversion strategy on 15m charts. A breakout strategy on daily charts. Each strategy operates independently with its own signal engine, parameters, and risk limits.

The benefit of multiple strategies is diversification. When trending markets kill the mean-reversion strategy, the trend-following strategy thrives. When choppy markets kill the trend strategy, the mean-reversion strategy profits. Together, the equity curve smooths out.

The Long Game

Algorithmic trading is not a get-rich-quick scheme. It is a compound-interest machine. Small, consistent gains over months and years produce results that feel impossible when you look at them in aggregate but feel mundane week to week.

The system is designed for this long game. The trailing stop lets winners run. The risk management prevents catastrophic losses. The evolution framework keeps the system adapting. And the operator — you — provides the awareness that makes it all work.

You Have the System.

13 chapters. 35 signals. The trailing stop algorithm. The prompts. The configuration. The evolution framework. Everything Oracle built, documented, and handed to you.

The next step is yours. Build it. Run it in simulation. Go live when the numbers justify it. Evolve it every week. And never, ever risk more than you can afford to lose.

The system trades at the level of the operator's awareness. Raise yours.

Course complete — 13/13 chapters
You have the system. Build it. Test it. Evolve it. The operator's awareness is the edge.
Ch 1