Skip to main content

How the AI Makes Trading Decisions

The 7N7D trading agent uses multiple AI models and data sources to make informed trading decisions. Here's an inside look at how it works.

Decision Framework​

Every trade goes through a structured analysis:

Market Data ──► Analysis ──► AI Decision ──► Risk Check ──► Execute
│ │ │ │
▼ ▼ ▼ ▼
Prices Patterns Confidence Position
Volume Sentiment Direction Sizing
News Indicators Entry/Exit Leverage

Analysis Inputs​

Technical Analysis​

  • RSI (Relative Strength Index) - Overbought/oversold detection
  • MACD - Trend direction and momentum
  • Bollinger Bands - Volatility and price channels
  • Chart Patterns - Historical pattern recognition

Market Regime Detection​

The AI identifies three market conditions:

RegimeCharacteristicsStrategy
BULLUptrend, high momentumTrend following, higher leverage
BEARDowntrend, risk-offShorter positions, lower exposure
NEUTRALSideways, low volatilityRange trading, mean reversion

Sentiment Analysis​

  • News headlines and social media
  • Funding rates on exchanges
  • Open interest changes
  • Whale wallet monitoring

CME Gap Analysis​

Institutional data from CME Bitcoin futures helps predict weekend gaps and institutional sentiment.

Equity Inputs (Stocks, testnet)​

For equity perpetuals such as Tesla (xyz:TSLA) the agent uses a separate set of inputs instead of the crypto regime and macro signals: the underlying stock market's session and calendar (regular hours, holidays, early closes, earnings and other event windows), the perpetual's own mark and oracle prices, spread and order-book depth on the venue, and the health and delay of any external reference feed. These inputs decide whether a new position may be opened and how large it may be; the signal logic itself is not published.

The AI Engine​

7N7D uses DeepSeek AI for decision-making, chosen for:

  • Reasoning ability - Complex market analysis
  • Fast inference - Real-time decisions
  • Cost efficiency - Sustainable operations

How Decisions Are Made​

  1. Gather Data - All market data collected
  2. Build Context - AI receives market summary
  3. Generate Analysis - AI reasons about conditions
  4. Output Decision - Direction, confidence, timing
  5. Apply Constraints - Risk management limits applied
  6. Route - Venue Router selects the best venue
  7. Execute - Trade sent to Hyperliquid (perps) or Uniswap (spot swaps)

Ensemble Strategy​

The agent doesn't rely on a single signal. It combines several independent strategies and signals into one trading decision, and it adapts as market conditions change. This reduces false signals compared with any single approach.

How the strategies are combined and weighted is internal to the agent.

Confidence Scoring​

Every decision includes a confidence score (0-100%). Higher-confidence decisions can take larger positions, and low-confidence decisions are skipped. Every position still stays inside the risk limits below.

Risk Management​

The AI follows strict risk rules:

Position Sizing​

Position Size = Account Balance × Risk Factor × Confidence

Where:
- Risk Factor = 0.5x to 1.5x (based on recent performance)
- Confidence = AI's conviction level

Leverage Limits​

  • Conservative: 3-5x leverage
  • Normal: 5-10x leverage
  • Aggressive: 10-20x leverage (only in high-confidence setups)

Stop-Losses​

Every position has automated stop-losses based on:

  • Technical support/resistance levels
  • Maximum drawdown limits (typically 5-10%)
  • Time-based exits for stale positions

Self-Improvement​

What makes 7N7D unique is the AI improves itself:

Daily Strategy Loop (4AM UTC)​

  1. Reviews previous 24 hours of trades
  2. Identifies patterns in winners/losers
  3. Generates code improvements
  4. Tests changes automatically
  5. Deploys if tests pass

Learning Metrics​

The AI tracks and optimizes for:

  • Win rate (target: 65%+)
  • Profit factor (target: 1.5+)
  • Sharpe ratio (target: 2.0+)
  • Maximum drawdown (limit: 20%)

Failure Prevention​

The agent learns from mistakes:

  • Maintains database of failed patterns
  • Checks new trades against past failures
  • Avoids repeating the same errors

Performance Tracking​

All decisions are logged for transparency:

{
"timestamp": "2025-12-06T14:30:00Z",
"asset": "BTC-PERP",
"direction": "LONG",
"confidence": 78,
"entry_price": 98500,
"target": 101000,
"stop_loss": 97000
}

Investors can view all decisions in the dashboard. The agent's written rationale is kept for internal review and is not part of the public record.


Next: Learn about Multi-Venue Trading to see how trades are routed across exchanges, or skip to Transparency to see how everything is verified.