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 β β DCA / Manualβ
β - Config β β Close β
β - 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 evaluated
- Closed - Sold (manual, stop loss, or DCA exit)
Key attributes:
- Purchase price and amount
- Current value and P&L
- Stop loss percentage
- DCA history
Learn more about Positions β
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.
DCA (Dollar Cost Averaging): Automatically buys more when price drops.
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 DCA - buy more if triggered
- Broadcast updates via WebSocket
Step 5: Position Closes
Position closes when:
- Stop loss triggers - Price drops below threshold
- 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 |
| DCA | Average down | Auto-buy on drop |