Core Concepts Overview
Understand the fundamental concepts that power Nexgent's trading engine.
How Nexgent Works
Nexgent is an automated trading engine that processes signals and executes trades on Solana. Here's the high-level flow:
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Signal │────▶│ Agent │────▶│ Trade │────▶│ Position │
│ Arrives │ │ Evaluates │ │ Executes │ │ Monitored │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
│ │
│ │
┌──────┴──────┐ ┌──────┴──────┐
│ Eligible? │ │ Stop Loss / │
│ - Balance │ │ Take Profit │
│ - Config │ │ DCA / Manual│
│ - Filters │ └─────────────┘
└─────────────┘Core Components
1. Trading Signals
What: Buy recommendations for specific tokens.
Where they come from:
- External services via API
- Webhooks
- Manual entry
Key attributes:
- Token address
- Signal type (e.g., Hypersurge, Breakout confirmation, Price Reversal)
- Signal strength (1-5)
- Signal provider (e.g., Nexgent AI)
- Activation reason (e.g., Price broke above 5-period high, Bullish candle formation, Volume up 74.30% vs average, Price up 3.14% vs last bucket, Buy/sell ratio strongly bullish (157.73%))
Learn more about Trading Signals →
2. Agents
What: Autonomous trading entities with their own configuration and wallets.
What they do:
- Evaluate incoming signals
- Execute trades when criteria are met
- Manage positions
Key attributes:
- Trading mode (simulation/live)
- Trading configuration
- Wallet assignments
- Automated trading toggle
3. Positions
What: Active token holdings being monitored.
Lifecycle:
- Opened - Buy trade executed
- Monitored - Price tracked, stop loss and take-profit evaluated
- Closed - Sold (manual, stop loss, take-profit, or stale trade)
Key attributes:
- Purchase price and amount
- Current value and P&L
- Stop loss percentage
- DCA history
4. Trading Modes
Simulation: Virtual trades with fake balances. No real money.
Live: Real trades on Solana blockchain. Uses actual SOL.
Learn more about Simulation vs Live →
5. Risk Management
Stop Loss: Automatically sells when price drops below threshold.
Take Profit: Automatically sells portions of the position as price rises (preset or custom levels, optional moon bag).
DCA (Dollar Cost Averaging): Automatically buys more when price drops. Can be enabled together with Take Profit.
Learn more about Risk Management →
The Trading Flow
Let's trace a complete trade from signal to close:
Step 1: Signal Arrives
{
"tokenAddress": "DezXAZ8z...",
"symbol": "BONK",
"signalType": "Hypersurge",
"signalStrength": 4,
"source": "Nexgent AI",
"activationReason": "Price broke above 5-period high, Bullish candle formation, Volume up 74.30% vs average, Price up 3.14% vs last bucket, Buy/sell ratio strongly bullish (157.73%)"
}Step 2: Agent Evaluates
The agent checks:
| Check | Example |
|---|---|
| Signal strength | Is 4 ≥ minScore (3)? ✓ |
| Balance | Has enough SOL? ✓ |
| Blacklist | Token not blocked? ✓ |
| Whitelist | Token allowed (if enabled)? ✓ |
| Existing position | Not already holding? ✓ |
Step 3: Trade Executes
If all checks pass:
- Calculate position size based on balance and config
- Get quote from Jupiter Aggregator
- Execute swap (simulated or on-chain)
- Create position record
Step 4: Position Monitored
Continuously:
- Fetch current price from price feeds
- Calculate P&L against purchase price
- Evaluate stop loss - sell if triggered
- Evaluate take-profit - partial sell if gain levels hit (when enabled)
- Evaluate DCA - buy more if triggered (when enabled)
- Broadcast updates via WebSocket
Step 5: Position Closes
Position closes when:
- Stop loss triggers - Price drops below threshold
- Take-profit completes - All levels hit (and no moon bag, or moon bag + stop loss)
- Manual close - User closes via dashboard
- Stale trade - Configurable auto-close for idle positions
Data Flow Diagram
Key Concepts Summary
| Concept | Purpose | Key Point |
|---|---|---|
| Signal | Trade trigger | Strength 1-5, filtered by agent (score, type, blacklist) |
| Agent | Trading entity | Has config, wallet, positions |
| Position | Active holding | Tracked until closed |
| Simulation | Paper trading | Risk-free learning |
| Live | Real trading | Actual SOL on Solana |
| Stop Loss | Limit losses | Auto-sell on drop |
| Take Profit | Lock in gains | Partial sell on rise (levels + optional moon bag) |
| DCA | Average down | Auto-buy on drop (can run alongside Take Profit) |