How to build an optimized AI trading agent — the 2026 practical guide
Pick the right market, describe a real strategy, watch drawdown not just returns, and let the agent iterate. A complete owner’s playbook.
AI trading agents are the fastest-growing category in non-custodial crypto trading. Built right, they execute your strategy 24/7 without you watching a chart. Built wrong, they bleed capital quietly. This guide walks through how to design agents on SorooshX that have a measurable edge — without taking hidden risk.
You don’t need to code. You don’t need to write Pine Script. You don’t need to understand reinforcement learning. You need a strategy idea, the willingness to test it honestly, and the discipline to iterate.
Step 1 — Pick the market and the timeframe
Most underperforming agents fail before the first trade is placed because the owner picked the wrong market or the wrong timeframe.
Choose your market based on
- Volatility you can stomach (BTC and ETH are tame; mid-caps are not).
- Volume depth (thin markets slip on every fill).
- Funding rate behavior (matters for perp shorts).
Choose your timeframe based on
- How often you want the agent to trade (1m = many trades, 1d = few).
- Your strategy’s natural rhythm (a mean-reversion idea on the daily makes no sense).
- Historical signal density (if your indicator gives one signal a year on 1d, the agent sits idle).
Step 2 — Describe your idea, not your code
The Train Agent panel is a conversation. Type what you want the way you’d explain it to a friend:
“Enter long when the 9-EMA crosses above the 21-EMA on a strong trend, and only if RSI is between 40 and 70. Exit on a 2× ATR adverse move or when RSI hits 80.”
The system translates that into an executable spec. It clamps unreasonable values, drops anything it doesn’t recognize, and shows you a preview before anything saves.
Include in your description
- Entry conditions — what has to be true to open a trade.
- Exit conditions — when to take profit and when to cut.
- Direction — long, short, or both.
- Risk preferences — tight stops, wide targets, etc.
Leave out
- Implementation jargon. You don’t need to say “JSON” or “use the indicator block.”
- Hyperspecific numbers you can’t justify. Extreme values are clamped automatically.
- Multi-strategy bundles. One agent = one idea. Use multiple agents for multiple ideas.
Step 3 — Use the Owner Directive to steer behavior
Every agent has an Owner Directive field — a free-form note the agent reads every time it self-trains. This is where you put principles that don’t fit neatly into entry/exit rules:
“This is a volatile altcoin. Always prefer ATR-based stops over percentage stops. Never tighten take-profit below 3× ATR.”
“Trade only during US market hours. Avoid weekends.”
“I expect a multi-week trend. Don’t react to single-bar noise.”
The directive is not an instruction the agent follows blindly — it’s context the learning loop weighs when proposing tweaks. Treat it as your trader’s letter to the agent. Update it as your view of the market evolves.
Step 4 — Read the backtest verdict before you commit
Every strategy spec is backtested before it goes live. The verdict tells you whether the strategy has any statistical edge over recent history.
| Verdict | What it means | What to do |
|---|---|---|
| edge_survives | Beat buy-and-hold across walk-forward folds. | The only category worth deploying. |
| no_edge | Did not show a reliable advantage on recent history. | Iterate or move on. Do not just hope. |
Step 5 — Track drawdown, not just returns
Maximum drawdown is the most underappreciated number in trading. A 15% lifetime return looks great until you see it came with a 40% mid-cycle drawdown — a level very few traders can hold through without panic-closing.
SorooshX surfaces maximum drawdown on every agent, alongside Sharpe and win rate. Optimize for the Sharpe-to-drawdown ratio, not raw return. A boring agent with 8% return and 8% drawdown is genuinely better than a flashy one with 20% return and 35% drawdown.
Step 6 — Use Train history and revert when needed
Every conversation turn with your agent is saved with a full snapshot of the strategy before and after. This means:
- You can scroll back through every adjustment you ever made.
- You can reuse an old prompt as a starting point for a new variation.
- You can revert to any earlier version in a single click if a recent change hurt performance.
The history is your trading journal — actually structured, actually searchable. Treat each prompt as a hypothesis. If it works, keep it. If it doesn’t, revert and try the next one.
Step 7 — Visualize what your agent sees
The agent’s chart shows the same indicators your strategy actually uses, drawn directly on the price stream. If your spec uses EMA(9) and EMA(21), you see them. If you use Donchian channels, you see them. If you use ATR-based exits, you see the volatility envelope.
Step 8 — Let the agent learn (but verify)
Once an agent has accumulated trades, the learning loop kicks in. The agent receives small, conservative parameter adjustments based on what’s actually working in the market. These adjustments are proposed, not auto-applied — they shadow-trade alongside the live parameters and only get promoted if they demonstrably outperform.
This protects you from two failure modes:
- Overfitting to recent noise. A change that helped over the last 48h doesn’t necessarily help long-term.
- The agent drifting from your thesis. The Owner Directive grounds learning in your stated principles.
You don’t need to micromanage. Check in once a week. Watch drawdown trends. Update your Owner Directive when the market regime changes.
Common mistakes that sink otherwise good agents
- Over-leveraged on the first try. Start at 2–3× until you’ve seen the agent through a real drawdown.
- Too many simultaneous changes. Change one thing, observe, then change the next. Otherwise you can’t tell what helped.
- Closing winning paper agents. If a paper agent is working, leave it running. Longer = more honest statistics.
- Ignoring the verdict. A no_edge verdict means iterate, not “go live and hope.”
- Treating the indicator list as exhaustive. A simple two-indicator strategy with disciplined risk will outperform a six-indicator chaos.
FAQ
Is SorooshX custodial?
No. Your funds stay on Hyperliquid. Agents execute via a non-custodial agent key with no withdrawal permission. You can revoke an agent at any time.
Do I need to know how to code?
No. The Train Agent panel takes plain English. You describe; the system compiles.
Can I run multiple agents?
Yes. Most successful users run several agents across different markets, timeframes, and strategies. Diversification within your agent portfolio behaves like diversification in any other portfolio.
How long until an agent shows meaningful results?
Paper-mode agents need at least 48 hours for any statistic to be trustworthy. Two weeks is better. Drawdown specifically only reveals itself across multiple market regimes — give it time.
What’s the difference between paper and live?
Paper uses real prices and real signals but simulated capital. Live executes on your Hyperliquid account via an agent key you authorize. Drawdown, slippage, and funding behavior may differ; that’s why we recommend extensive paper validation before going live.
Can the agent drain my account?
The agent key has no withdrawal permission. The worst case is fast unprofitable trading inside the bounds you set (max leverage, max notional, etc.). Set those bounds conservatively until you trust the agent.
Does the engine learn from other users’ agents?
Aggregate market behavior across the platform informs general improvement signals — anonymously and only at the symbol level. Your strategy, your directive, and your prompts are private to you.
What if my strategy doesn’t fit any preset?
Describe it in your own words. The system compiles novel combinations all the time. If you hit a wall, simplify — most edges come from one strong signal, not five weak ones.
Final thought
The traders who win on SorooshX aren’t the ones with the most exotic strategies. They’re the ones who pick a clear thesis, paper-test it honestly, watch drawdown as obsessively as PnL, and let the agent iterate slowly toward something durable.