What is strategy timeframe mapping?
Strategy timeframe mapping defines which candle intervals (Kline periods) are used for each strategy type in MagicTradeBot.
It ensures that each strategy—whether scalping, swing trading, or long-term investing—uses appropriate data intervals for signal generation and analysis.
⚙️ How It Works
- Each strategy type is mapped to one or more candle intervals:
strategy_intervals:
hft: ["1m"] # High-frequency trading
scalp: ["3m","5m","15m"] # Short-term trades
day: ["15m","30m","1h","2h","4h"]
swing: ["1h","2h","4h","6h","12h"]
long: ["1d"] # Long-term positions
default: ["5m","15m","1h"] # Fallback for unspecified strategies
The bot uses these intervals to:
- Generate signals
- Calculate indicators
- Aggregate analytics
- Make decisions
Multi-interval mapping allows strategies to confirm signals across multiple timeframes, improving reliability.
⚖️ Why It Matters
Signal Accuracy
- Using the wrong interval may lead to incorrect entries/exits.
- Example: A scalp strategy needs minute-level candles, not daily candles.
Strategy Optimization
- Each strategy type reacts differently to market movement; proper intervals maximize efficiency.
Exchange Compatibility
- Some exchanges require specific formatting for intervals (e.g., "1D" vs "1d").
🚀 Summary
Strategy timeframe mapping ensures each strategy uses the correct candle intervals:
- Maps strategies like scalp, day, swing, long, HFT to their optimal timeframes
- Supports multi-timeframe signal confirmation
- Improves signal reliability, accuracy, and overall strategy performance
Related Topics
Ready to trade? Download MagicTradeBot free
and test in paper mode before going live.