Skip to main content
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_thresholdml_config.json

Minimum winning class probability from the ensemble to generate a signal.
ValueEffect
0.50Many signals, lower precision
0.60Current 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_diffml_config.json

The winning class must beat the second-best class by this margin.
ValueEffect
0.05Very low bar — many signals pass
0.10Current production value
0.15Only 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_multiplierconfig.json

SL = current ATR × this value. On M15, ATR ≈ 50200,soSL50–200, so SL ≈ 40–160 at 0.8×.
ValueEffect
0.6Tight SL — more losers hit, but smaller losses
0.8Current production value
1.0Wider 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_multiplierconfig.json

TP = current ATR × this value.
ValueEffect
0.6Quick TP capture — high WR, low R:R
0.8Current production value — balanced
1.5Training-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_percentconfig.json

Percent of account equity risked per trade. Lot size is calculated as:
lot = (equity * risk_percent / 100) / (sl_distance_in_usd)
ValuePractical 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_lotconfig.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_lossesconfig.json

Bot pauses after this many consecutive losses. State persists in state.json — manually reset or wait for the daily counter reset.
ValueEffect
3Very tight — pauses after a normal losing streak
5Current production value
10Loose — allows longer drawdown episodes
Safe range: 4–7.

max_daily_lossconfig.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_thresholdml_config.json

Minimum EXIT class probability to close early.
ValueEffect
0.55Fires frequently — 12+ early exits per 38d
0.80Current production value — ~1 exit per 38d
0.90Almost never fires

position_model.prediction.min_prob_diffml_config.json

EXIT must beat HOLD by this margin.
ValueEffect
0.10Low bar — many exits
0.25Current production value
0.40Very 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_filterconfig.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_minutesconfig.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