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:
| Regime | Characteristics | Strategy |
|---|---|---|
| BULL | Uptrend, high momentum | Trend following, higher leverage |
| BEAR | Downtrend, risk-off | Shorter positions, lower exposure |
| NEUTRAL | Sideways, low volatility | Range 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
- Gather Data - All market data collected
- Build Context - AI receives market summary
- Generate Analysis - AI reasons about conditions
- Output Decision - Direction, confidence, timing
- Apply Constraints - Risk management limits applied
- Route - Venue Router selects the best venue
- 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)
- Reviews previous 24 hours of trades
- Identifies patterns in winners/losers
- Generates code improvements
- Tests changes automatically
- 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.