Nesto Pro Strategy Configs are YAML files that deep-merge over the base bot's default.yaml. This chapter explains the structure, override rules, and environment handling.
Every config preset is a YAML dict with keys that mirror the AppConfig dataclass hierarchy:
# Example preset structure
mode:
run_mode: live-auto
allow_new_entries: true
markets:
allowlist:
- BTC
- ETH
- SOL
risk:
max_leverage: 2
max_risk_per_trade_pct: 1.0
max_open_positions: 2Only the keys you specify override the base config. Omitted keys keep their default.yaml values.
The bot merges configs using a recursive dictionary update:
def deep_merge(base, override):
result = dict(base)
for key, value in override.items():
if key in result and isinstance(result[key], dict) and isinstance(value, dict):
result[key] = deep_merge(result[key], value)
else:
result[key] = value
return resultThis means nested structures merge rather than replace entirely. Setting only markets.allowlist preserves markets.denylist, markets.max_spread_bps, etc.
Environment variables override any YAML value at runtime. The pattern is NESTO__:
export NESTO__risk__max_risk_per_trade_pct=2.0
export NESTO__risk__max_open_positions=3
export NESTO__markets__allowlist='["BTC","ETH"]'The bot reads these at startup via EnvConfig.from_env():
env_key = f"NESTO__{section}__{key}"
if env_key in os.environ:
value = json.loads(os.environ[env_key])
set_nested(config, section.split("__"), value)Precedence: env var > preset YAML > default.yaml.
configs/
├── pro_daily_short_tilt.yaml # Daily timeframe short-tilt
├── pro_momentum_15m.yaml # 15m momentum scalper
└── pro_mean_reversion_1h.yaml # 1h mean-reversion
Each file ships as a standalone preset. Copy into the bot's config/ directory to deploy.
This chapter details every tunable parameter in the strategy presets, with example YAML configurations.
Grid-style entries place limit orders at predefined levels. The bot offsets entry price from mid by entry_limit_offset_bps:
# Entry grid configuration
entries:
strategy: conservative_trend_v1_candidate
timeframe: 15m # Candle interval: 15m, 1h, 4h, 1d
candle_lookback: 250 # Bars for indicator calculation
signal_cooldown_minutes: 60 # Min time between signals per coin
entry_order_type: limit_gtc # limit_gtc or limit_ioc
entry_limit_offset_bps: 15 # Price offset from mid in bpsHigher timeframes (1h, 4h, 1d) reduce signal frequency but increase reliability. Lower timeframes produce more trades but more noise.
The ladder takes partial profits at increasing targets:
exits:
take_profit:
reduce_only: true
ladder:
- target_pct: 0.40 # Close 50% at +0.4%
close_pct: 50
- target_pct: 0.80 # Close 30% at +0.8%
close_pct: 30
- target_pct: 1.40 # Close 20% at +1.4%
close_pct: 20Each rung closes a fraction of the position. The remaining runner continues until stopped out or the time stop fires.
Controls trade frequency and concentration:
risk:
max_open_positions: 4 # Concurrent position limit
max_trades_per_day: 100 # Total trade count per day
cooldown_after_loss_minutes: 15 # Wait after a losing trade
max_consecutive_losses: 10 # Auto-lockout threshold
disallow_averaging_down: true # Prevent adding to losers
disallow_position_flip: true # Prevent reversing a positionThe stop is the most important parameter. It is calculated from ATR and capped:
exits:
stop:
atr_multiplier: 1.2 # Stop distance = ATR × multiplier
min_stop_pct: 0.25 # Floor as % of entry price
max_stop_pct: 1.50 # Ceiling as % of entry priceThe stop must always sit inside the liquidation price. The sizing engine enforces this by reducing leverage when a wide stop would push liquidation too close.
Once the trade reaches trigger_pct profit, the stop ratchets to breakeven. After activate_after_r (1.0 R = profit equal to initial risk), a trailing stop activates:
exits:
breakeven:
trigger_pct: 0.35
trailing:
activate_after_r: 1.0
trail_atr_multiplier: 0.8
min_trail_pct: 0.30Get the full Nesto Pro Strategy Configs and unlock everything.
Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.
Access all interactive tools with complete data, all workload profiles, and the full scenario library.
Downloadable source code, configuration files, and working examples from every chapter.
Free updates for life. Every new chapter, tool, and improvement included.