كيف يتعلّم وكيلك ليلاً — نظام التدريب الذاتي
وكلاء SSE لا يقفون مكانهم. مدرّب يراجع آخر ٢٤ ساعة من صفقات كل وكيل ويقترح ضبطًا.
Most "AI trading agents" are static — you set them up, they run forever with the same rules, and the only way to improve them is for you to keep editing prompts. SSE agents are not built that way. Every agent on the platform goes through a continuous learning loop: review, propose, shadow-trade, evaluate, promote (or discard). The owner can sleep, the agent keeps adapting.
This article explains exactly what runs, when it runs, what the agent considers, and what you see as the owner. Plus the three new indicators (ATR, Donchian, Volume Z-score) just landed in the strategy DSL — read the second half for what they unlock.
The self-training loop
Four scheduled jobs work together. You will see traces of all of them in your agent's Activity feed.
| Job | How often | What it does |
|---|---|---|
| Paper tick | Every 1 minute | Reads new candles, evaluates the strategy, opens/closes paper positions. The heartbeat of the engine. |
| Nightly coach | Every 6 hours | For every agent that has not been reviewed in the last 20 hours, calls the AI coach with the agent's last 24h of closed trades + entry context, gets back a proposed tuning, queues it as a CHALLENGER for the next phase. |
| Champion vs. Challenger | Every 4 hours | Decides whether to PROMOTE the queued challenger to live or DISCARD it. The challenger only wins if it beat the champion over a fair forward-trading window. |
| Daily verdict refresh | Once a day at 03:00 UTC | Re-runs each agent's walk-forward backtest with current parameters. Updates the verdict chip you see on the agent card and recomputes the per-market overlay (which hours / days the engine should skip based on the agent's own track record). |
What the nightly coach actually sees
The coach is not a black box. For every agent it reviews, it gets a structured summary:
- The agent's current strategy (momentum / mean-reversion / breakout / custom DSL) and the parameters in use.
- Aggregate performance over the last 24 hours: trades opened, win rate, average winner, average loser, max drawdown, realized PnL.
- A sample of the BEST trades (entry context, what the indicators said, why the trade was taken) and the WORST trades (same).
- The market regime the agent has been trading in: trend strength, average volatility, whether volume was elevated or quiet.
- A list of allowed tunings — bounded parameters the coach is permitted to suggest changes to.
It does NOT see your wallet, your balance, the full owner identity, or any platform-level data. It only sees one agent's public performance.
The reply is a single proposed tuning — for example: "reduce the volatility filter from 0.5 to 0.3 because the worst trades all happened during low-vol chop." That proposal becomes the next phase's challenger.
Champion vs. Challenger — the safety net
A proposed tuning is never applied directly to your live trading. Instead it runs in parallel:
- Your CHAMPION (current parameters) keeps paper-trading exactly as before. Nothing in your Run is affected.
- The CHALLENGER (proposed parameters) shadow-trades the same market in parallel, scoring hypothetical PnL on every tick. You can see its progress in the Activity feed.
- After at least 48 hours AND at least 6 challenger trades, the Champion vs. Challenger evaluator compares both books on the same window.
- If the challenger out-earned the champion by the promotion margin AND its hypothetical drawdown did not exceed the champion's by more than the safety budget, it is PROMOTED to live champion. Otherwise it is DISCARDED.
- Either way, the decision is logged. You see "Promoted tuning" or "Rejected tuning — kept previous params" in the Activity feed.
Daily verdict refresh + per-market overlay
Once a day at 03:00 UTC, every agent's walk-forward backtest is re-run with its current (post-promotion) parameters. This updates two things:
- The verdict chip on the agent card (Edge Survives / No Edge / etc.) — kept fresh so what you see in the directory matches what the agent is actually doing.
- The per-market overlay — a learned filter of "which hours of the day and which days of the week have produced the worst PnL for THIS agent on THIS market". Future entries during historically-bad windows are skipped automatically. It is the agent learning its own market's personality.
What you see as the owner
The Activity feed on the agent detail page is the place to watch self-training in real time. You will see entries like:
- 🤖 Coach review — proposed: tighten stop from 1.5% to 1.2% (3 worst trades all hit stop)
- ⚖️ Challenger started — shadow-trading proposed params
- ✅ Promoted — challenger beat champion +$12.40 over 53 trades; new params are live
- ❌ Rejected — challenger trailed champion by $4.20; kept previous params
- 📅 Daily verdict refresh — Edge Survives (was Promising)
- ⏰ Overlay updated — Sundays 06-08 UTC now blocked (5 of 6 worst trades in this window)
New: ATR, Donchian, and Volume Z-score
The strategy DSL just gained three OHLCV-aware indicators in addition to the existing close-only set (SMA, EMA, RSI, ROC, STDEV). The new ones are big practical wins because they unlock strategies the close-only indicators could not express.
ATR — Average True Range
Volatility in price units. ATR(14) = the average size of the last 14 bars' true range (high to low, accounting for gaps). Use it when you want your strategy to be aware of volatility.
Example prompts that now produce ATR conditions:
- "Only enter when ATR is at least 2x the average — I want to skip choppy days."
- "Place a stop 1.5x ATR below entry, take profit at 2x ATR above."
- "Reduce size when ATR rises sharply." (the engine already does volatility-aware sizing; this just makes it explicit)
DONCHIAN_HIGH / DONCHIAN_LOW — channel breakouts
The highest high (or lowest low) over the last N bars. Classic breakout setup: enter long when price clears the Donchian high.
- "Enter long when price breaks above the 20-bar high." → price_vs_indicator DONCHIAN_HIGH(20) op=gte
- "Short when price breaks below the 50-bar low." → price_vs_indicator DONCHIAN_LOW(50) op=lte
- "Trail my stop with the 10-bar Donchian low." → custom exit using DONCHIAN_LOW(10)
VOL_Z — Volume Z-score
How busy this bar is compared to recent normal. VOL_Z(20) > 1.5 means the current bar's volume is 1.5+ standard deviations above the 20-bar mean — a real participation spike.
- "Only trade when volume is at least 1 standard deviation above normal."
- "Skip entries during low-volume hours."
- "Take partial profit when volume spikes — likely climax."
Should you add them to your strategy?
The honest answer is: maybe. The new indicators are powerful but the engine already has effective implicit filters for most cases (silent volatility-aware sizing, silent low-volume filtering). Adding them explicitly to your DSL gives you control + makes the strategy auditable, but it also adds degrees of freedom that the safety backtest must justify.
What you can't see (and shouldn't need to)
The exact gating thresholds, the safety budget, the bootstrap iteration counts, and the specific math the coach uses are intentionally not documented. They are the engine's job to manage, not yours. The published guarantees are the durable ones:
- A proposed change only sticks if it beats the current params in real forward trading.
- The walk-forward verdict you see on the card is honest — passed every check, not cherry-picked.
- Per-market overlays come from the agent's own trade history, not a hand-tuned schedule.
- You can disable self-training entirely from Manage; default is on.