- How much equity the bot risks per trade (position size)
- Which confidence thresholds and SL/TP ranges the weekly sweep searches
- The weekly drawdown pause threshold
- The hard total drawdown halt that protects against margin calls
weekly_optimize.py and it is saved to config.json and models/optimize_best.json for all future cron runs.
For regular users, set profile 1-5 during onboarding (python scripts/onboarding.py --profile 1|2|3|4|5) and skip local retraining. Developers/operators can set or override profiles during weekly optimization workflows.
Why profiles exist
A single risk setting does not work for everyone. A 10,000 account with the same 4% risk have very different outcomes. More importantly, the same drawdown that is psychologically acceptable to one trader is catastrophic to another. Profiles solve this by bounding both the search space and the safety limits to what makes sense for each risk tolerance.The five profiles
Profile 1 — Steady Income
Profile 1 — Steady Income
Best for: conservative investors, first-time algo traders, anyone whose primary goal is capital preservation over growth.
The sweep only tests conservative configs. You will see fewer trades and lower returns compared to higher profiles, but much smoother equity curves and minimal drawdown.The bot halts permanently if total equity loss from your starting balance reaches 20%. On a 400. The broker’s margin call threshold (~$2 at 0.01 lot) is never reached.The risk model produces conservative multipliers for this profile — typically
| Setting | Value |
|---|---|
| Risk per trade | 0.5–1.0% |
| Confidence threshold | 0.65–0.70 |
| SL/TP ATR range | 0.7–0.9× |
| Weekly drawdown pause | 8% |
| Hard halt (anti-margin-call) | 20% |
| Minimum balance | $500 |
0.50–0.80 in drawdown, returning toward 1.0 only after a sustained win streak.Profile 2 — Conservative
Profile 2 — Conservative
Best for: traders who have some experience with automated systems, want modest compounding, and can tolerate occasional 20–25% drawdown months.
A good middle ground between capital safety and meaningful compounding. Weekly checks are sufficient.The risk model learns that 30% is the absolute ceiling — it cuts position sizes aggressively when drawdown approaches that limit.
| Setting | Value |
|---|---|
| Risk per trade | 1.0–1.5% |
| Confidence threshold | 0.62–0.68 |
| SL/TP ATR range | 0.7–1.0× |
| Weekly drawdown pause | 12% |
| Hard halt (anti-margin-call) | 30% |
| Minimum balance | $500 |
Profile 3 — Balanced (default)
Profile 3 — Balanced (default)
Best for: most users. Matches the default NOVOSKY config that weekly sweeps have historically converged to.
If you are unsure which profile to choose, start here. Recent weekly OOS snapshots (Apr 18-20, 2026) ranged roughly from WR 67-79%, PF 1.38-2.43, and Score 4.84-21.34 depending on the active live config.The risk model provides the most balanced multiplier range — it scales down during losing streaks and scales back up during recovery.
| Setting | Value |
|---|---|
| Risk per trade | 1.5–2.0% |
| Confidence threshold | 0.60–0.65 |
| SL/TP ATR range | 0.8–1.0× |
| Weekly drawdown pause | 20% |
| Hard halt (anti-margin-call) | 45% |
| Minimum balance | $500 |
Profile 4 — Growth
Profile 4 — Growth
Best for: traders comfortable with 40–50% account swings who monitor the bot at least a few times per week. Higher expected return, higher volatility.
Expect larger equity swings. The wider confidence range means more trades — which amplifies both wins and losses. Monitor drawdown weekly.The risk model allows the multiplier to reach 1.15 during strong win streaks, amplifying compounding.
| Setting | Value |
|---|---|
| Risk per trade | 2.0–3.0% |
| Confidence threshold | 0.58–0.62 |
| SL/TP ATR range | 0.8–1.2× |
| Weekly drawdown pause | 25% |
| Hard halt (anti-margin-call) | 55% |
| Minimum balance | $500 |
Profile 5 — Aggressive
Profile 5 — Aggressive
Best for: experienced traders who understand leverage and drawdown, actively watch the bot daily, and have risk capital they can afford to lose.
Maximum compounding speed. Still protected from margin call — the hard halt stops at 65% loss (500 account), far above the broker’s ~$2 margin call threshold at minimum lot size. Requires daily monitoring.The risk model learns the widest multiplier range for this profile — up to 1.20 during a strong run, but drops sharply near the 65% halt ceiling to prevent triggering it.
| Setting | Value |
|---|---|
| Risk per trade | 3.0–4.0% |
| Confidence threshold | 0.55–0.60 |
| SL/TP ATR range | 0.8–1.2× |
| Weekly drawdown pause | 30% |
| Hard halt (anti-margin-call) | 65% |
| Minimum balance | $500 |
Risk model and profiles
Each profile is connected to the risk multiplier model in a direct way: the model is trained with the active profile’smax_total_drawdown_pct as the hard ceiling for label generation. When the labeler evaluates what multiplier would have been best for the next 20 trades, it discards any multiplier that would have breached that profile’s limit.
This means:
| Profile | Hard halt | Risk model behavior |
|---|---|---|
| 1 — Steady Income | 20% | Multiplier rarely exceeds 0.80. Drops to 0.15–0.35 after 2+ consecutive losses. |
| 2 — Conservative | 30% | Multiplier range 0.25–1.00. Resets slowly after a losing streak. |
| 3 — Balanced | 45% | Multiplier range 0.35–1.10. Adapts to streaks while staying within bounds. |
| 4 — Growth | 55% | Multiplier range 0.50–1.15. Allows meaningful size-up during strong equity. |
| 5 — Aggressive | 65% | Multiplier range 0.50–1.20. Widest range; sharpest cut near the halt ceiling. |
"enabled": false in config.json → risk_model. The multiplier becomes a fixed 1.0. Lot sizing behaves exactly as it did before the risk model was introduced.
How the hard drawdown halt works
Every profile setsmax_total_drawdown_pct in config.json. This is a permanent kill switch, not a pause.
In live trading (trading.py):
Each cycle, the bot checks:
total_loss_pct >= max_total_drawdown_pct, the bot:
- Sends a Telegram alert with current equity and the reason
- Logs a critical error
- Calls
sys.exit(99)— the process exits and does not restart automatically
scripts/pm2-start.sh for the --stop-exit-codes 99 flag).
In backtesting (backtest_config.py):
The simulation stops early at the bar where equity crosses the halt threshold. All metrics reflect the truncated run, giving you an accurate picture of what would have happened in live trading.
Why it never auto-resets:
Unlike the weekly drawdown pause (which resets every Monday), the total drawdown halt requires you to manually investigate what went wrong — a model regime change, an extreme market event, or a config error — before restarting. This is intentional.
Margin call safety proof
At VT Markets with 1:500 leverage, trading BTCUSD at ~$97,000:- Minimum lot: 0.01 BTC
- Margin required:
$97,000 × 0.01 / 500 = $1.94 - Margin call level: ~50% of used margin = ~$0.97
$500 × (1 - 0.65) = $175. The bot halts at 1.94 margin requirement`. Margin call is impossible if the halt fires.
How to change profiles
For regular users, re-run onboarding with the profile you want:config.json in Phase 6. The running trading.py picks up the new max_total_drawdown_pct on the next config reload cycle (within 60 seconds).
You can also edit config.json directly:
Questionnaire walkthrough
When you run onboarding without--profile in an interactive terminal, you will see a risk-profile questionnaire (developer/operator workflows can also use weekly_optimize.py interactively):
- Time horizon
- Maximum loss you can accept (as % of starting balance)
- Return goal
- How often you can monitor the bot
- What you would do after a 20% losing week
- Your trading experience level
1–5 to override.
In cron mode (no TTY), the script loads the last saved profile from models/optimize_best.json. If no profile is saved yet, it defaults to Balanced (3).