Precision Configuration Guide for MagicTradeBot — Fine-Tune Technical Signals & Trading Accuracy

Overview

MagicTradeBot's Precision Configuration system gives you complete control over signal quality versus quantity. Each of the 15+ signal types has its own dedicated configuration section in tradesettings.yaml, allowing you to fine-tune parameters from aggressive (high frequency, more noise) to conservative (low frequency, high confidence). This granular control enables you to scan thousands of symbols and filter down to only the absolute best opportunities that match your risk profile.

The Quality vs Quantity Tradeoff

Signal Strictness Spectrum

AGGRESSIVE ←――――――――――――――――――――――――――――――――――→ CONSERVATIVE
(High Quantity)                              (High Quality)

More Signals                                 Fewer Signals
Lower Win Rate                              Higher Win Rate
Higher Risk                                 Lower Risk
Active Trading                              Selective Trading

Key Principle: Tighter thresholds = fewer signals but higher probability trades. Looser thresholds = more signals but more false positives.

Configuration Philosophy

Every signal parameter can be adjusted along three dimensions:

  1. Sensitivity – How easily the signal triggers (threshold values)
  2. Confirmation – How many conditions must align (multi-factor requirements)
  3. Filtering – What additional criteria must be met (volume, volatility, etc.)

Configuration Structure

All signal settings are centralized in tradesettings.yaml:

yaml
signals:
  rsi:
    enabled: true
    oversold_threshold: 30
    overbought_threshold: 70
    # ... more RSI settings
  
  macd:
    enabled: true
    fast_period: 12
    slow_period: 26
    # ... more MACD settings
  
  # ... all other signal configurations

Each section is independently configurable, allowing you to mix aggressive settings for some signals with conservative settings for others.


Signal-by-Signal Configuration Options

RSI Signals Configuration

Purpose: Control overbought/oversold sensitivity and divergence detection

yaml
rsi:
  enabled: true
  period: 14

  # Threshold Configuration
  oversold_threshold: 30
  overbought_threshold: 70

  # Quality Filters
  require_volume_confirmation: true
  min_volume_multiplier: 1.5

  # Divergence Settings
  enable_divergence_detection: true
  divergence_lookback: 20
  divergence_min_strength: 0.6

  # Signal Filtering
  ignore_in_strong_trends: true
  min_price_move_percent: 0.5

Tuning Guide:

  • More Signals: oversold=40, overbought=60, require_volume=false
  • Better Signals: oversold=20, overbought=80, require_volume=true, min_strength=0.8

MACD Signals Configuration

Purpose: Fine-tune crossover sensitivity and histogram thresholds

yaml
macd:
  enabled: true

  # Period Configuration
  fast_period: 12
  slow_period: 26
  signal_period: 9

  # Signal Triggers
  trigger_on_crossover: true
  trigger_on_histogram_flip: true
  trigger_on_divergence: true

  # Quality Filters
  min_histogram_value: 0.0001
  require_momentum_confirmation: true
  min_bars_since_last_signal: 5

  # Divergence
  divergence_lookback: 15
  divergence_min_strength: 0.65

  # Context Filters
  ignore_choppy_markets: true
  choppiness_threshold: 61.8

Tuning Guide:

  • More Signals: fast=8, slow=17, min_histogram=0, ignore_choppy=false
  • Better Signals: fast=16, slow=35, min_histogram=0.0005, min_bars=10

Bollinger Bands Configuration

Purpose: Control volatility sensitivity and mean reversion strictness

yaml
bollinger_bands:
  enabled: true

  period: 20
  std_dev: 2.0

  trigger_on_touch: true
  trigger_on_break: false
  require_reversal_candle: true

  min_band_width_percent: 2.0
  max_band_width_percent: 10.0
  require_volume_spike: true
  min_volume_ratio: 1.3

  enable_squeeze_alerts: true
  squeeze_threshold: 1.5
  squeeze_breakout_multiplier: 2.0

  require_price_return_to_middle: false

Tuning Guide:

  • More Signals: std_dev=1.5, trigger_on_break=true, require_reversal=false
  • Better Signals: std_dev=2.5, min_band_width=3.0, require_volume=true

ATR Signals Configuration

Purpose: Define volatility expansion thresholds and breakout criteria

yaml
atr:
  enabled: true
  period: 14

  breakout_multiplier: 1.5
  min_atr_expansion_percent: 20
  lookback_for_expansion: 10

  require_volume_confirmation: true
  min_volume_multiplier: 1.8
  require_directional_close: true
  close_position_percent: 0.8

  min_bars_in_consolidation: 5
  max_prior_volatility: 2.5

  ignore_gaps: true
  ignore_news_hours: true

Tuning Guide:

  • More Signals: multiplier=1.2, min_expansion=10, min_bars=3
  • Better Signals: multiplier=2.0, min_expansion=30, min_bars=8, volume=2.0x

Volume Signals Configuration

Purpose: Set thresholds for unusual volume detection

yaml
volume:
  enabled: true

  lookback_period: 20
  spike_multiplier: 2.0

  detect_buying_volume: true
  detect_selling_volume: true
  detect_climax_volume: true

  min_candle_body_percent: 40
  require_price_confirmation: true
  min_price_move_percent: 1.0

  climax_multiplier: 4.0
  climax_lookback: 50
  signal_reversal_after_climax: true

  use_volume_profile: true
  significant_level_volume_ratio: 1.5

  ignore_low_liquidity_symbols: true
  min_dollar_volume: 100000

Tuning Guide:

  • More Signals: multiplier=1.5, min_body=30, min_move=0.5
  • Better Signals: multiplier=3.0, min_body=60, climax=5.0, dollar_volume=500k

Momentum / Velocity Signals Configuration

Purpose: Detect rate-of-change acceleration

yaml
momentum_velocity:
  enabled: true

  momentum_period: 10
  velocity_lookback: 5

  min_momentum_percent: 2.0
  min_velocity_increase: 1.5

  require_sustained_momentum: true
  min_consecutive_periods: 3
  require_volume_increase: true

  enable_momentum_divergence: true
  divergence_lookback: 15
  divergence_sensitivity: 0.7

  ignore_choppy_conditions: true
  max_directional_changes: 2
  require_trend_alignment: true
  trend_timeframe_multiplier: 4

Tuning Guide:

  • More Signals: period=5, min_momentum=1.0, consecutive=2, require_trend=false
  • Better Signals: period=20, min_momentum=3.0, consecutive=5, velocity=2.0

RSI Divergence Configuration

Purpose: Fine-tune divergence sensitivity

yaml
rsi_divergence:
  enabled: true

  lookback_period: 20

  min_pivot_strength: 3
  min_pivots_required: 2

  min_divergence_angle: 15
  min_rsi_difference: 5
  min_price_difference_percent: 1.0

  require_volume_confirmation: true
  volume_must_decrease: true
  require_trend_context: true

  detect_hidden_divergence: true
  hidden_requires_stricter_rules: true

  ignore_in_consolidation: true
  min_atr_for_signal: 0.5

Tuning Guide:

  • More Signals: lookback=10, pivot=2, angle=10, volume=false
  • Better Signals: lookback=30, pivot=5, angle=25, rsi_diff=8

VWAP & Bands Configuration

Purpose: Configure VWAP deviation band logic

yaml
vwap:
  enabled: true

  reset_period: "daily"
  use_cumulative: true

  enable_bands: true
  band_1_std_dev: 1.0
  band_2_std_dev: 2.0
  band_3_std_dev: 3.0

  trigger_on_band_touch: true
  trigger_level: 2
  require_rejection_candle: true

  min_distance_from_vwap_percent: 0.5
  require_volume_at_level: true
  volume_percentile_threshold: 70

  require_return_toward_vwap: true
  min_reversion_percent: 30
  max_bars_for_reversion: 5

  ignore_trending_markets: false
  min_time_from_reset: 60

Tuning Guide:

  • More Signals: trigger_level=1, min_distance=0.2, rejection=false
  • Better Signals: trigger_level=3, min_distance=1.0, volume_percentile=80

CVD (Cumulative Volume Delta) Configuration

Purpose: Detect pressure imbalances

yaml
cvd:
  enabled: true

  lookback_period: 100

  enable_divergence_signals: true
  divergence_lookback: 20
  min_divergence_strength: 0.7

  cvd_trend_period: 20
  min_cvd_trend_strength: 0.6

  trigger_on_divergence: true
  trigger_on_trend_change: true
  trigger_on_exhaustion: true

  min_cvd_change_percent: 10
  require_price_confirmation: true
  min_price_move_percent: 0.8

  exhaustion_lookback: 10
  exhaustion_threshold: 0.3
  require_volume_divergence: true

  ignore_low_volume_periods: true
  min_volume_for_valid_cvd: 1.5

Tuning Guide:

  • More Signals: lookback=50, min_change=5, exhaustion=0.5
  • Better Signals: lookback=200, min_change=20, strength=0.8, volume_divergence=true

Multi-Timeframe Alignment Configuration

Purpose: Define alignment rules across multiple chart intervals

yaml
multi_timeframe:
  enabled: true

  base_timeframe: "5m"
  higher_timeframes:
    - "15m"
    - "1h"
    - "4h"

  require_all_aligned: false
  min_alignment_percent: 75

  primary_signals:
    - "RSI"
    - "MACD"
    - "MOMENTUM"

  confirmation_signals:
    - "TREND_DIRECTION"
    - "REGIME"

  trend_indicator: "EMA"
  trend_periods:
    fast: 20
    slow: 50

  require_higher_tf_trend: true
  min_higher_tf_strength: 0.6
  ignore_conflicting_signals: true

  weight_by_timeframe: true
  timeframe_weights:
    "5m": 1.0
    "15m": 1.5
    "1h": 2.0
    "4h": 3.0

Tuning Guide:

  • More Signals: alignment=50, require_higher_tf_trend=false, check 2 TF
  • Better Signals: alignment=100, require_all=true, check 4+ TF

Market Regime Detection Configuration

Purpose: Detect trending, ranging, volatile, or calm market conditions

yaml
market_regime:
  enabled: true

  lookback_period: 50

  trend_indicator: "ADX"
  trend_threshold: 25

  range_indicator: "CHOPPINESS"
  range_threshold: 61.8

  volatility_measure: "ATR_PERCENTILE"
  high_volatility_threshold: 70
  low_volatility_threshold: 30

  signal_on_regime_change: true
  require_confirmation_bars: 3

  adjust_other_signals: true

  regime_adjustments:
    trending:
      rsi_overbought: 80
      rsi_oversold: 20
      follow_trend_only: true
    
    ranging:
      bb_std_dev: 1.5
      enable_mean_reversion: true
      disable_breakout_signals: true
    
    volatile:
      atr_multiplier: 2.5
      reduce_position_size: 0.5
    
    calm:
      atr_multiplier: 1.2
      increase_position_size: 1.2

Tuning Guide:

  • More Signals: lookback=20, trend_threshold=20, confirm=1
  • Better Signals: lookback=100, trend_threshold=30, confirm=5

Relative Strength vs BTC Configuration

Purpose: Configure comparison metrics and outperformance thresholds

Relative Strength vs BTC Configuration

Purpose: Configure comparison metrics and outperformance thresholds

relative_strength:
  enabled: true
  
  # RS Calculation
  lookback_period: 20            # Calculate RS over 20 periods
                                 # Short-term = 10, Long-term = 50
  
  comparison_symbol: "BTCUSDT"   # Default comparison asset
  
  # Strength Thresholds
  min_outperformance_percent: 5  # Must outperform by ≥5%
                                 # Aggressive = 2, Conservative = 10
  
  min_consecutive_periods: 3     # Outperform for 3 consecutive bars
  
  # Quality Filters
  require_volume_confirmation: true
  min_relative_volume: 1.2       # Symbol volume > 1.2x BTC's relative volume
  
  require_absolute_gain: true    # Both symbol AND BTC must be positive (bull market)
  allow_absolute_loss_outperformance: false # Don't signal if both declining
  
  # Divergence Detection
  detect_rs_divergence: true     # Price weakening but RS strengthening
  divergence_lookback: 15
  
  # Trend Alignment
  require_btc_trend_agreement: false # Allow counter-BTC signals
  btc_trend_threshold: 0.5       # If required, BTC trend strength needed
  
  # Breakout Detection
  detect_rs_breakout: true       # RS breaking above previous highs
  rs_breakout_lookback: 50
  rs_breakout_buffer: 0.95       # Must exceed 95% of lookback high

Tuning Guide:

  • More Signals: min_outperformance=2, consecutive=2, require_absolute=false
  • Better Signals: min_outperformance=10, consecutive=5, require_volume=true

Order Flow Imbalance (OFI) Configuration

Purpose: Set sensitivity for order book imbalance detection

order_flow_imbalance:
  enabled: true
  
  # OFI Calculation
  calculation_window: 5          # Measure imbalance over 5 ticks/bars
                                 # Ultra-fast = 3, Standard = 5, Slower = 10
  
  # Imbalance Thresholds
  min_imbalance_ratio: 2.0       # Buys/Sells ratio > 2.0 or < 0.5
                                 # Aggressive = 1.5, Conservative = 3.0
  
  min_imbalance_volume: 10000    # Minimum volume for valid OFI signal
  
  # Quality Filters
  require_sustained_imbalance: true
  min_sustained_periods: 3       # Imbalance must persist 3 calculation windows
  
  require_price_confirmation: true
  min_price_move_with_ofi: 0.1   # Price must move ≥0.1% in OFI direction
  
  # Exhaustion Detection
  detect_ofi_exhaustion: true    # OFI weakening = reversal
  exhaustion_ratio_threshold: 1.2 # Imbalance falling below 1.2
  
  # Context Filters
  ignore_low_liquidity: true
  min_order_book_depth: 50000    # Require $50k depth at best bid/ask
  
  ignore_spread_widening: true   # Skip signals when spread > normal
  max_spread_multiplier: 2.0
  
  # Time-Based Filters
  ignore_market_open_close: true # Skip first/last 5 mins of session
  open_close_buffer_minutes: 5

Tuning Guide:

  • More Signals: window=3, ratio=1.5, sustained=2, price_move=0.05
  • Better Signals: window=10, ratio=3.0, sustained=5, depth=100k

Choppiness Index Configuration

Purpose: Define thresholds for trending vs choppy market identification

choppiness_index:
  enabled: true
  
  # Chop Calculation
  period: 14                     # Standard = 14, Faster = 7, Slower = 21
  
  # Regime Thresholds
  choppy_threshold: 61.8         # Chop > 61.8 = choppy/ranging
  trending_threshold: 38.2       # Chop < 38.2 = strong trend
                                 # Aggressive: 55/45, Conservative: 65/35
  
  # Signal Generation
  signal_on_transition: true     # Signal when crossing thresholds
  require_confirmation_bars: 2   # Wait 2 bars after crossing
  
  signal_direction_from:         # How to determine buy/sell
    method: "PRICE_MOMENTUM"     # Options: "PRICE_MOMENTUM", "BREAKOUT_DIRECTION", "CUSTOM"
    lookback: 10
  
  # Quality Filters
  min_time_in_chop: 10           # Must be choppy for ≥10 bars before breakout signal
  max_time_in_chop: 50           # Don't signal if choppy >50 bars (likely to continue)
  
  require_volume_expansion: true # Volume must increase on breakout
  min_volume_multiplier: 1.5
  
  # Integrated Usage
  use_as_filter_only: false      # True = only filter other signals, don't generate own
  
  filter_other_signals_in_chop: true # Disable certain signals when choppy
  signals_to_disable_in_chop:
    - "BREAKOUT"
    - "MOMENTUM"
    - "TREND_FOLLOWING"
  
  signals_to_enable_in_chop:
    - "MEAN_REVERSION"
    - "RANGE_TRADING"

Tuning Guide:

  • More Signals: thresholds=55/45, confirmation=1, min_time=5
  • Better Signals: thresholds=65/35, confirmation=3, min_time=15, max_time=30

Ichimoku Cloud Configuration

Purpose: Configure Ichimoku components and signal strictness

ichimoku:
  enabled: true
  
  # Ichimoku Periods
  tenkan_period: 9               # Conversion line (fast)
  kijun_period: 26               # Base line (medium)
  senkou_b_period: 52            # Leading span B (slow)
  displacement: 26               # Cloud displacement forward
  
  # Traditional: 9/26/52, Aggressive: 7/22/44, Conservative: 12/30/60
  
  # Signal Requirements
  require_price_above_cloud: true      # For buy signals
  require_price_below_cloud: true      # For sell signals
  require_tk_cross: true               # Tenkan/Kijun crossover
  require_positive_chikou: true        # Chikou above price
  require_future_cloud_agreement: true # Future cloud color matches signal
  
  # Strictness Levels
  strictness: "moderate"         # Options: "loose", "moderate", "strict", "extreme"
  
  # Strictness definitions:
  # loose: 1 condition required
  # moderate: 3 conditions required
  # strict: 4 conditions required
  # extreme: all 5 conditions required
  
  # Quality Filters
  min_cloud_thickness_percent: 0.5 # Cloud must be ≥0.5% thick
  ignore_thin_clouds: true
  
  min_distance_from_cloud: 0.3   # Price must be ≥0.3% from cloud edge
  
  require_volume_confirmation: true
  min_volume_on_signal: 1.3
  
  # Trend Strength
  measure_trend_strength: true
  min_trend_strength: 0.6        # All components must align with strength ≥0.6
  
  # Context Filters
  ignore_conflicting_components: true # Skip if components disagree
  max_conflicting_components: 1  # Allow 1 component to conflict

Tuning Guide:

  • More Signals: periods=7/22/44, strictness="loose", require_only_2_conditions
  • Better Signals: periods=12/30/60, strictness="extreme", min_strength=0.8

Combined Signals Configuration

Purpose: Configure weighted multi-indicator consensus system

combined_signals:
  enabled: true
  
  # Signal Weighting
  weights:
    rsi: 15
    macd: 20
    bollinger_bands: 15
    atr: 10
    volume: 25
    momentum: 10
    divergence: 20
    vwap: 15
    cvd: 20
    # ... other signals
  
  # Consensus Requirements
  min_total_weight: 65           # Require 65/100 weighted points
                                 # Aggressive = 45, Conservative = 80
  
  min_signals_agreeing: 3        # At least 3 signals must agree
                                 # Aggressive = 2, Conservative = 5
  
  max_conflicting_signals: 1     # Allow max 1 opposite signal
  
  # Signal Categories
  require_trend_signal: true     # Must have ≥1 trend indicator
  require_momentum_signal: true  # Must have ≥1 momentum indicator
  require_volume_signal: true    # Must have ≥1 volume indicator
  
  # Quality Enhancements
  bonus_for_diverggence: 15      # Add 15 points if divergence present
  bonus_for_mtf_alignment: 20    # Add 20 points if multi-timeframe aligned
  bonus_for_regime_match: 10     # Add 10 if regime matches signal type
  
  # Dynamic Weight Adjustment
  adjust_weights_by_regime: true
  
  regime_weight_modifiers:
    trending:
      macd: 1.5                  # Increase MACD weight in trends
      momentum: 1.5
      rsi: 0.7                   # Decrease RSI weight in trends
    
    ranging:
      rsi: 1.5                   # Increase RSI weight in ranges
      bollinger_bands: 1.5
      macd: 0.6
  
  # Confidence Scoring
  output_confidence_score: true  # Include 0-100 confidence in signal
  min_confidence_for_action: 70  # Only trade signals ≥70 confidence
  
  # Timeout Rules
  max_time_between_signals: 10   # All signals must occur within 10 bars
  signals_must_be_recent: true

Tuning Guide:

  • More Signals: min_weight=45, min_signals=2, max_conflicting=2
  • Better Signals: min_weight=80, min_signals=5, max_conflicting=0, min_confidence=80

Spike Detection Configuration

Purpose: Define thresholds for extreme price movement identification

spike_detection:
  enabled: true
  
  # Statistical Thresholds
  lookback_period: 100
  std_dev_multiplier: 3.0
  
  # Spike Types
  detect_pump_spikes: true
  detect_crash_spikes: true
  
  # Quality Filters
  min_spike_percent: 2.0
  max_spike_percent: 50.0
  
  require_volume_confirmation: true
  min_volume_multiplier: 2.5
  
  require_single_candle: false
  max_candles_for_spike: 3
  
  # Context Validation
  ignore_gap_spikes: true
  ignore_low_liquidity: true
  min_liquidity_threshold: 50000
  
  # Signal Logic
  signal_direction:
    pump_action: "BUY"
    crash_action: "SELL"
  
  # Continuation vs Reversal
  check_for_continuation: true
  continuation_lookback: 5
  min_continuation_percent: 50
  
  # Exhaustion Detection
  detect_spike_exhaustion: true
  exhaustion_volume_multiplier: 5.0
  signal_reversal_on_exhaustion: true

Tuning Guide:

  • More Signals: std_dev=2.0, min_spike=1.0, volume=1.5x, max_candles=5
  • Better Signals: std_dev=4.0, min_spike=3.0, volume=3.0x, single_candle=true

PUMP / CRASH Signals Configuration

Purpose: Configure sustained volatility move detection with volume backing

pump_crash:
  enabled: true
  
  # Move Detection
  min_percent_move: 3.0
  max_bars_for_move: 5
  
  # Volume Requirements
  require_volume_surge: true
  min_volume_multiplier: 1.8
  volume_must_increase: true
  
  # Momentum Validation
  require_momentum_acceleration: true
  min_acceleration_ratio: 1.2
  
  allow_pullback_bars: 1
  max_pullback_percent: 30
  
  # Quality Filters
  require_directional_close: true
  min_close_position: 0.75
  
  ignore_wick_dominated: true
  max_wick_to_body_ratio: 0.6
  
  # Context Filters
  ignore_during_news: true
  ignore_market_open: true
  open_buffer_minutes: 15
  
  ignore_low_liquidity: true
  min_dollar_volume: 250000
  
  # Signal Types
  pump_action: "BUY"
  crash_action: "SELL"
  
  # Continuation Settings
  wait_for_consolidation: false
  consolidation_max_bars: 5
  consolidation_max_range: 1.0
  
  # Exhaustion Detection
  detect_climax: true
  climax_volume_multiplier: 4.0
  fade_climax_bars: true

Tuning Guide:

  • More Signals: min_move=1.5, max_bars=10, volume=1.3x, allow_pullback=2
  • Better Signals: min_move=5.0, max_bars=3, volume=2.5x, acceleration=1.5

Summary

MagicTradeBot's Precision Configuration system provides unprecedented control over signal quality and quantity. By adjusting settings in tradesettings.yaml, you can:

  • Filter thousands of symbols down to only the highest-probability setups
  • Match your risk tolerance with granular strictness controls
  • Adapt to market conditions with dynamic threshold adjustments
  • Optimize for your trading style from scalping to position trading
  • Combine signals intelligently using weighted consensus algorithms
  • Maximize win rates while maintaining adequate trading frequency

The system scales from simple preset configurations for beginners to fully customized multi-dimensional filtering for advanced algorithmic traders. Every parameter is documented, backtestable, and designed to help you find the perfect balance between catching opportunities and avoiding false signals.

📎 Related Topics