This page documents every parameter that affects live trading and backtesting, what it does, and safe ranges to stay within. All changes should be validated with backtest_config.py --oos-only before going live.
Never change dynamic_sltp.enabled to false. Models were trained with ATR-aware labels. Disabling ATR SL/TP causes live WR to drop from ~78% to ~49%.
Signal confidence
These control when the ensemble generates a trade signal.
prediction.confidence_threshold — ml_config.json
Minimum winning class probability from the ensemble to generate a signal.
| Value | Effect |
|---|
| 0.50 | Many signals, lower precision |
| 0.60 | Current production value — balanced |
| 0.65+ | Few signals, can produce zero trades in short windows |
Safe range: 0.50–0.65. Above 0.65 can kill signal flow entirely on M15.
prediction.min_probability_diff — ml_config.json
The winning class must beat the second-best class by this margin.
| Value | Effect |
|---|
| 0.05 | Very low bar — many signals pass |
| 0.10 | Current production value |
| 0.15 | Only high-conviction signals |
Safe range: 0.05–0.15.
SL/TP multipliers
These scale the ATR-based stop-loss and take-profit for each trade.
dynamic_sltp.sl_atr_multiplier — config.json
SL = current ATR × this value. On M15, ATR ≈ 50–200,soSL≈40–160 at 0.8×.
| Value | Effect |
|---|
| 0.6 | Tight SL — more losers hit, but smaller losses |
| 0.8 | Current production value |
| 1.0 | Wider SL — fewer stop-outs, but larger losses when they happen |
Safe range: 0.6–1.2. Below 0.6 increases noise-triggered losses.
dynamic_sltp.tp_atr_multiplier — config.json
TP = current ATR × this value.
| Value | Effect |
|---|
| 0.6 | Quick TP capture — high WR, low R:R |
| 0.8 | Current production value — balanced |
| 1.5 | Training-time label value — higher R:R, lower WR |
Safe range: 0.6–1.5. The training labels use atr_tp_mult = 1.5, so setting tp_atr_multiplier to 1.5 aligns live execution exactly with how the models were trained.
The labeling TP (1.5×) and live execution TP (0.8×) can differ deliberately. Setting live TP lower than the label TP means you exit before the label’s target — increasing WR at the cost of R:R. The Phase 15 sweep found 0.8× optimal for the current Score metric.
Risk sizing
dynamic_position_sizing.risk_percent — config.json
Percent of account equity risked per trade. Lot size is calculated as:
lot = (equity * risk_percent / 100) / (sl_distance_in_usd)
| Value | Practical effect on $500 account |
|---|
| 1% | $5 risk per trade — very conservative |
| 2% | $10 risk per trade — current production |
| 5% | $25 risk per trade — aggressive |
| 10%+ | Significant drawdown risk at normal BTCUSD volatility |
Safe range for $500 account: 1–4%. Higher values compound fast but also produce large drawdown episodes.
dynamic_position_sizing.max_lot — config.json
Hard cap on lot size regardless of risk calculation. Prevents compound sizing from opening oversized positions.
Safe range: 0.5–2.0 for VT Markets cent account. Keep at 1.0 until account grows significantly.
Circuit breaker
max_consecutive_losses — config.json
Bot pauses after this many consecutive losses. State persists in state.json — manually reset or wait for the daily counter reset.
| Value | Effect |
|---|
| 3 | Very tight — pauses after a normal losing streak |
| 5 | Current production value |
| 10 | Loose — allows longer drawdown episodes |
Safe range: 4–7.
max_daily_loss — config.json
Stop trading if today’s realized loss exceeds this dollar amount. Default: 99999 (disabled).
Suggested value for $500 account: 15 (~3% daily loss limit).
Position model thresholds
These control how aggressively the ML position model exits open trades early.
position_model.prediction.exit_threshold — ml_config.json
Minimum EXIT class probability to close early.
| Value | Effect |
|---|
| 0.55 | Fires frequently — 12+ early exits per 38d |
| 0.80 | Current production value — ~1 exit per 38d |
| 0.90 | Almost never fires |
position_model.prediction.min_prob_diff — ml_config.json
EXIT must beat HOLD by this margin.
| Value | Effect |
|---|
| 0.10 | Low bar — many exits |
| 0.25 | Current production value |
| 0.40 | Very conservative |
Rule of thumb: Higher exit_threshold + higher min_prob_diff = more trades reach TP naturally = higher WR. Lower values = more aggressive position management = useful only if position model accuracy is very high (>80% EXIT precision).
Session and trend filters
enable_ema_trend_filter — config.json
When true: BUY only when price > EMA200, SELL only when price < EMA200.
Currently disabled (false). Re-enable and run python scripts/sweep.py --target signal --mode confidence to test impact.
news_block_minutes — config.json
Block trades N minutes before and after high-impact news events. Default: 0 (disabled). The live bot already injects live news data into features — this is an additional hard block.
Applying and validating changes
Always validate with OOS backtest before going live:
# Apply changes to config.json or ml_config.json, then:
python backtest_config.py \
--balance 500 --no-swap --leverage 500 \
--spread 16.95 --oos-only --no-chart
# Compare before vs after
python scripts/compare_configs.py \
--old-config config_backup.json \
--old-ml ml_config_backup.json \
--old-label "before" --new-label "after"
If Score improved: keep. If not: revert.
# Revert
cp config_backup.json config.json
cp ml_config_backup.json ml_config.json