Contents

Chapter 1

Chapter 1: Configuration File Structure

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.

YAML File Anatomy

Every config preset is a YAML dict with keys that mirror the AppConfig dataclass hierarchy:

yaml
# 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: 2

Only the keys you specify override the base config. Omitted keys keep their default.yaml values.

Deep Merge Behavior

The bot merges configs using a recursive dictionary update:

python
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 result

This means nested structures merge rather than replace entirely. Setting only markets.allowlist preserves markets.denylist, markets.max_spread_bps, etc.

Environment Overrides

Environment variables override any YAML value at runtime. The pattern is NESTO__

__:

bash
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():

python
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.

File Layout

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.

Chapter 2

Chapter 2: Strategy Parameters Reference

This chapter details every tunable parameter in the strategy presets, with example YAML configurations.

Grid Parameters

Grid-style entries place limit orders at predefined levels. The bot offsets entry price from mid by entry_limit_offset_bps:

yaml
# 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 bps

Higher timeframes (1h, 4h, 1d) reduce signal frequency but increase reliability. Lower timeframes produce more trades but more noise.

Take-Profit Levels

The ladder takes partial profits at increasing targets:

yaml
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: 20

Each rung closes a fraction of the position. The remaining runner continues until stopped out or the time stop fires.

Max Positions and Cooldown

Controls trade frequency and concentration:

yaml
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 position

Stop-Loss Configuration

The stop is the most important parameter. It is calculated from ATR and capped:

yaml
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 price

The 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.

Breakeven and Trailing

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:

yaml
exits:
  breakeven:
    trigger_pct: 0.35
  trailing:
    activate_after_r: 1.0
    trail_atr_multiplier: 0.8
    min_trail_pct: 0.30
Chapter 3
🔒 Available in full product

Chapter 3: Leverage Management and Liquidation Calculations

Chapter 4
🔒 Available in full product

Chapter 4: Portfolio Allocation and Multi-Pair Management

Chapter 5
🔒 Available in full product

Chapter 5: Backtesting with Strategy Configs

You’ve reached the end of the free preview

Get the full Nesto Pro Strategy Configs and unlock everything.

All Chapters

Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.

Full Tool Suite

Access all interactive tools with complete data, all workload profiles, and the full scenario library.

Source Files

Downloadable source code, configuration files, and working examples from every chapter.

Lifetime Updates

Free updates for life. Every new chapter, tool, and improvement included.

Buy Now — $79 →
📦 Free sample included — download another copy for the full product.
Nesto Pro Strategy Configs v1.0.0 — Free Preview