Skip to main content
Skip to main content
Version: Next 🚧

Timeframes Reference

Overview

Timeframes determine how frequently your algorithm evaluates market conditions and generates trading signals. x3Algo supports 8 timeframes ranging from 1 minute to 1 week, each suited for different trading styles and strategies.

Supported Timeframes

TimeframeCodeCandles per DayCandles per WeekBest For
1 Minute1m3751,875Scalping, High-Frequency
5 Minutes5m75375Scalping, Day Trading
15 Minutes15m25125Day Trading, Swing
30 Minutes30m12.562.5Day Trading, Swing
1 Hour1h6.2531.25Swing Trading
4 Hours4h1.57.5Swing, Position
1 Day1d15Position Trading
1 Week1w0.21Long-Term Position

Note: Candles per day based on typical 6.25-hour trading session (NSE: 9:15 AM - 3:30 PM)

Timeframe Details

1 Minute (1m)

Execution Frequency: Every 1 minute

Data Requirements:

  • Minimum historical data: 200 candles (3.3 hours)
  • Recommended historical data: 1,000 candles (16.7 hours)
  • Storage per symbol: ~500 KB per day

Characteristics:

  • Highest signal frequency
  • Most noise and false signals
  • Requires fast execution
  • High transaction costs
  • Sensitive to slippage

Strategy Suitability:

Good For:

  • Scalping strategies
  • High-frequency trading
  • Market making
  • Arbitrage opportunities
  • Very short-term momentum

Not Good For:

  • Swing trading
  • Position trading
  • Strategies with wide stops
  • Low-volume instruments

Example Configuration:

{
"name": "1-Minute Scalper",
"timeframe": "1m",
"strategyType": "scalping",
"positionSizing": {
"method": "fixed_quantity",
"quantity": 1
},
"riskParameters": {
"stopLoss": 0.2,
"takeProfit": 0.3,
"maxDailyLoss": 500
}
}

Best Practices:

  • Use tight stops (0.1-0.3%)
  • Quick profit targets (0.2-0.5%)
  • High win rate required (>60%)
  • Monitor transaction costs carefully
  • Use limit orders to reduce slippage

5 Minutes (5m)

Execution Frequency: Every 5 minutes

Data Requirements:

  • Minimum historical data: 200 candles (16.7 hours)
  • Recommended historical data: 500 candles (41.7 hours)
  • Storage per symbol: ~100 KB per day

Characteristics:

  • High signal frequency
  • Moderate noise
  • Good balance for scalping
  • Manageable transaction costs
  • Less sensitive to slippage than 1m

Strategy Suitability:

Good For:

  • Scalping strategies
  • Day trading
  • Momentum trading
  • Breakout strategies
  • Quick reversals

Not Good For:

  • Swing trading
  • Position trading
  • Strategies requiring large stops

Example Configuration:

{
"name": "5-Minute Momentum",
"timeframe": "5m",
"strategyType": "momentum",
"positionSizing": {
"method": "risk_based",
"riskPercentage": 1.0
},
"riskParameters": {
"stopLoss": 0.5,
"takeProfit": 1.0,
"maxDailyLoss": 1000
}
}

Best Practices:

  • Use 0.3-0.8% stops
  • Target 0.5-1.5% profits
  • Win rate target: 55-65%
  • Combine with volume indicators
  • Use confirmation candles (1-2)

15 Minutes (15m)

Execution Frequency: Every 15 minutes

Data Requirements:

  • Minimum historical data: 200 candles (50 hours)
  • Recommended historical data: 300 candles (75 hours)
  • Storage per symbol: ~35 KB per day

Characteristics:

  • Moderate signal frequency
  • Good signal quality
  • Popular for day trading
  • Reasonable transaction costs
  • Good risk/reward ratios

Strategy Suitability:

Good For:

  • Day trading
  • Swing trading (intraday)
  • Trend following
  • Breakout strategies
  • Pattern recognition

Not Good For:

  • High-frequency scalping
  • Long-term position trading

Example Configuration:

{
"name": "15-Minute Trend Follower",
"timeframe": "15m",
"strategyType": "momentum",
"positionSizing": {
"method": "risk_based",
"riskPercentage": 1.5
},
"riskParameters": {
"stopLoss": 1.0,
"takeProfit": 2.0,
"maxDailyLoss": 2000
}
}

Best Practices:

  • Use 0.8-1.5% stops
  • Target 1.5-3.0% profits
  • Win rate target: 50-60%
  • Excellent for EMA crossovers
  • Good for candlestick patterns

30 Minutes (30m)

Execution Frequency: Every 30 minutes

Data Requirements:

  • Minimum historical data: 200 candles (100 hours)
  • Recommended historical data: 250 candles (125 hours)
  • Storage per symbol: ~18 KB per day

Characteristics:

  • Lower signal frequency
  • Higher signal quality
  • Good for part-time traders
  • Low transaction costs
  • Clearer trends

Strategy Suitability:

Good For:

  • Day trading
  • Swing trading
  • Trend following
  • Mean reversion
  • Multi-timeframe analysis

Not Good For:

  • Scalping
  • High-frequency trading

Example Configuration:

{
"name": "30-Minute Swing",
"timeframe": "30m",
"strategyType": "swing",
"positionSizing": {
"method": "risk_based",
"riskPercentage": 2.0
},
"riskParameters": {
"stopLoss": 1.5,
"takeProfit": 3.0,
"maxDailyLoss": 3000
}
}

Best Practices:

  • Use 1.0-2.0% stops
  • Target 2.0-4.0% profits
  • Win rate target: 45-55%
  • Good for RSI divergence
  • Combine with 1h confirmation

1 Hour (1h)

Execution Frequency: Every 1 hour

Data Requirements:

  • Minimum historical data: 200 candles (200 hours / 8.3 days)
  • Recommended historical data: 250 candles (250 hours / 10.4 days)
  • Storage per symbol: ~9 KB per day

Characteristics:

  • Low signal frequency
  • High signal quality
  • Excellent for swing trading
  • Very low transaction costs
  • Strong trend identification

Strategy Suitability:

Good For:

  • Swing trading
  • Position trading (short-term)
  • Trend following
  • Mean reversion
  • Multi-timeframe confirmation

Not Good For:

  • Scalping
  • Day trading (too slow)
  • High-frequency strategies

Example Configuration:

{
"name": "1-Hour Swing Trader",
"timeframe": "1h",
"strategyType": "swing",
"positionSizing": {
"method": "risk_based",
"riskPercentage": 2.0
},
"riskParameters": {
"stopLoss": 2.0,
"takeProfit": 4.0,
"maxDailyLoss": 5000
}
}

Best Practices:

  • Use 1.5-3.0% stops
  • Target 3.0-6.0% profits
  • Win rate target: 40-50%
  • Excellent for MACD signals
  • Use with 4h trend filter

4 Hours (4h)

Execution Frequency: Every 4 hours

Data Requirements:

  • Minimum historical data: 200 candles (800 hours / 33 days)
  • Recommended historical data: 250 candles (1,000 hours / 42 days)
  • Storage per symbol: ~2.3 KB per day

Characteristics:

  • Very low signal frequency
  • Very high signal quality
  • Excellent for swing trading
  • Minimal transaction costs
  • Strong trend clarity

Strategy Suitability:

Good For:

  • Swing trading
  • Position trading
  • Trend following
  • Long-term strategies
  • Multi-timeframe analysis (higher TF)

Not Good For:

  • Day trading
  • Scalping
  • Strategies requiring frequent signals

Example Configuration:

{
"name": "4-Hour Position Trader",
"timeframe": "4h",
"strategyType": "position",
"positionSizing": {
"method": "risk_based",
"riskPercentage": 2.5
},
"riskParameters": {
"stopLoss": 3.0,
"takeProfit": 6.0,
"maxDailyLoss": 10000
}
}

Best Practices:

  • Use 2.0-4.0% stops
  • Target 4.0-8.0% profits
  • Win rate target: 35-45%
  • Excellent for moving average systems
  • Use with daily trend confirmation

1 Day (1d)

Execution Frequency: Once per day (at market close)

Data Requirements:

  • Minimum historical data: 200 candles (200 days)
  • Recommended historical data: 250 candles (250 days)
  • Storage per symbol: ~0.5 KB per day

Characteristics:

  • Minimal signal frequency
  • Highest signal quality
  • Best for position trading
  • Negligible transaction costs
  • Clearest trend identification

Strategy Suitability:

Good For:

  • Position trading
  • Long-term investing
  • Trend following
  • Mean reversion (long-term)
  • Portfolio strategies

Not Good For:

  • Day trading
  • Scalping
  • Strategies requiring quick exits

Example Configuration:

{
"name": "Daily Position Trader",
"timeframe": "1d",
"strategyType": "position",
"positionSizing": {
"method": "percentage",
"percentage": 5.0
},
"riskParameters": {
"stopLoss": 5.0,
"takeProfit": 10.0,
"maxDailyLoss": 20000
}
}

Best Practices:

  • Use 3.0-7.0% stops
  • Target 6.0-15.0% profits
  • Win rate target: 30-40%
  • Excellent for long-term trends
  • Use with weekly confirmation

1 Week (1w)

Execution Frequency: Once per week (at week close)

Data Requirements:

  • Minimum historical data: 200 candles (200 weeks / 3.8 years)
  • Recommended historical data: 250 candles (250 weeks / 4.8 years)
  • Storage per symbol: ~0.1 KB per day

Characteristics:

  • Rare signal frequency
  • Extremely high signal quality
  • Best for long-term investing
  • No transaction cost concerns
  • Major trend identification

Strategy Suitability:

Good For:

  • Long-term position trading
  • Investment strategies
  • Major trend following
  • Portfolio rebalancing
  • Low-maintenance strategies

Not Good For:

  • Day trading
  • Swing trading
  • Active trading strategies

Example Configuration:

{
"name": "Weekly Long-Term Investor",
"timeframe": "1w",
"strategyType": "position",
"positionSizing": {
"method": "percentage",
"percentage": 10.0
},
"riskParameters": {
"stopLoss": 10.0,
"takeProfit": 20.0,
"maxDailyLoss": 50000
}
}

Best Practices:

  • Use 7.0-15.0% stops
  • Target 15.0-30.0% profits
  • Win rate target: 25-35%
  • Focus on major trends
  • Minimal monitoring required

Multi-Timeframe Analysis

Timeframe Combinations

Scalping (1m/5m):

{
"timeframe": "1m",
"multiTimeframe": {
"enabled": true,
"higherTimeframe": "5m",
"confirmationRequired": true
}
}

Day Trading (15m/1h):

{
"timeframe": "15m",
"multiTimeframe": {
"enabled": true,
"higherTimeframe": "1h",
"confirmationRequired": true
}
}

Swing Trading (1h/4h):

{
"timeframe": "1h",
"multiTimeframe": {
"enabled": true,
"higherTimeframe": "4h",
"confirmationRequired": true
}
}

Position Trading (1d/1w):

{
"timeframe": "1d",
"multiTimeframe": {
"enabled": true,
"higherTimeframe": "1w",
"confirmationRequired": true
}
}

Timeframe Ratio Guidelines

Recommended Ratios:

  • 1:3 to 1:5 ratio between timeframes
  • Example: 15m entry with 1h confirmation (1:4 ratio)
  • Example: 1h entry with 4h confirmation (1:4 ratio)

Avoid:

  • Too close: 15m with 30m (1:2 ratio) - not enough separation
  • Too far: 5m with 4h (1:48 ratio) - too much lag

Timeframe Selection Guide

By Trading Style

Scalper:

  • Primary: 1m or 5m
  • Confirmation: 5m or 15m
  • Holding time: Minutes
  • Trades per day: 10-50+

Day Trader:

  • Primary: 15m or 30m
  • Confirmation: 1h
  • Holding time: Hours
  • Trades per day: 2-10

Swing Trader:

  • Primary: 1h or 4h
  • Confirmation: 4h or 1d
  • Holding time: Days to weeks
  • Trades per week: 2-10

Position Trader:

  • Primary: 1d or 1w
  • Confirmation: 1w
  • Holding time: Weeks to months
  • Trades per month: 1-5

By Available Time

Full-Time Trader:

  • Can use: 1m, 5m, 15m, 30m
  • Best: 5m or 15m
  • Requires constant monitoring

Part-Time Trader:

  • Can use: 30m, 1h, 4h
  • Best: 1h or 4h
  • Check 2-4 times per day

Passive Trader:

  • Can use: 1d, 1w
  • Best: 1d
  • Check once per day

By Market Volatility

High Volatility:

  • Use higher timeframes (1h, 4h, 1d)
  • Reduces noise and false signals
  • Wider stops required

Low Volatility:

  • Can use lower timeframes (15m, 30m, 1h)
  • Tighter stops possible
  • More frequent signals

By Instrument Type

Stocks (NSE/BSE):

  • Recommended: 15m, 30m, 1h, 1d
  • Avoid: 1m (too noisy)

Futures (MCX):

  • Recommended: 5m, 15m, 30m, 1h
  • Good for: All timeframes

Options:

  • Recommended: 15m, 30m, 1h
  • Avoid: 1d, 1w (time decay)

Commodities (NCDEX):

  • Recommended: 15m, 1h, 4h, 1d
  • Good for: Medium to long-term

Data Requirements

Historical Data Needs

For Indicators:

  • SMA/EMA: Requires period × 2 candles minimum
  • RSI: Requires 14 candles minimum
  • MACD: Requires 26 candles minimum
  • Bollinger Bands: Requires 20 candles minimum

Example:

Strategy uses 200 SMA on 15m timeframe
Minimum data: 200 × 2 = 400 candles
Time required: 400 × 15 minutes = 6,000 minutes = 100 hours

Storage Considerations

Per Symbol Storage (approximate):

  • 1m: 500 KB/day × 365 = 182 MB/year
  • 5m: 100 KB/day × 365 = 36 MB/year
  • 15m: 35 KB/day × 365 = 13 MB/year
  • 1h: 9 KB/day × 365 = 3.3 MB/year
  • 1d: 0.5 KB/day × 365 = 182 KB/year

For 100 Symbols:

  • 1m: 18 GB/year
  • 15m: 1.3 GB/year
  • 1d: 18 MB/year

Execution Frequency

Signal Generation

How Often Algorithms Check Conditions:

  • 1m: Every minute (375 times/day)
  • 5m: Every 5 minutes (75 times/day)
  • 15m: Every 15 minutes (25 times/day)
  • 1h: Every hour (6 times/day)
  • 1d: Once per day (1 time/day)

Candle Close Timing

When Signals Are Generated:

  • Signals generate at candle close
  • 15m timeframe: Signals at :00, :15, :30, :45
  • 1h timeframe: Signals at :00 of each hour
  • 1d timeframe: Signals at market close (3:30 PM IST)

Example:

15m timeframe on NSE:
9:15 AM - First candle closes at 9:30 AM
9:30 AM - Second candle closes at 9:45 AM
...
3:15 PM - Last candle closes at 3:30 PM

Performance Considerations

Transaction Costs by Timeframe

Estimated Trades per Day:

  • 1m: 20-50 trades → High costs
  • 5m: 10-30 trades → High costs
  • 15m: 3-10 trades → Moderate costs
  • 1h: 1-5 trades → Low costs
  • 1d: 0-2 trades → Very low costs

Cost Impact:

Brokerage: ₹20 per trade
STT: 0.025% (intraday sell)
Total per trade: ~₹25-50

1m strategy (30 trades/day): ₹750-1,500/day
15m strategy (5 trades/day): ₹125-250/day
1d strategy (1 trade/day): ₹25-50/day

Slippage by Timeframe

Expected Slippage:

  • 1m: 0.05-0.15% (high)
  • 5m: 0.03-0.10% (moderate-high)
  • 15m: 0.02-0.05% (moderate)
  • 1h: 0.01-0.03% (low)
  • 1d: 0.01-0.02% (very low)

Best Practices

1. Start with Higher Timeframes

Begin with 15m or 1h to learn:

  • Clearer signals
  • Lower costs
  • Less stress
  • Better risk management

2. Match Timeframe to Strategy

  • Scalping → 1m, 5m
  • Day trading → 15m, 30m, 1h
  • Swing trading → 1h, 4h
  • Position trading → 1d, 1w

3. Use Multi-Timeframe Confirmation

Always confirm with higher timeframe:

{
"timeframe": "15m",
"multiTimeframe": {
"enabled": true,
"higherTimeframe": "1h"
}
}

4. Adjust Stops and Targets

Scale stops/targets with timeframe:

  • 1m: 0.2% stop, 0.3% target
  • 15m: 1.0% stop, 2.0% target
  • 1h: 2.0% stop, 4.0% target
  • 1d: 5.0% stop, 10.0% target

5. Consider Your Lifestyle

Choose timeframe based on availability:

  • Full-time: 5m, 15m
  • Part-time: 1h, 4h
  • Passive: 1d

Common Mistakes

  1. Using 1m without experience - Start with 15m or higher
  2. Mixing incompatible timeframes - Use 1:4 or 1:5 ratio
  3. Not adjusting stops - Scale stops with timeframe
  4. Ignoring transaction costs - Lower timeframes = higher costs
  5. No multi-timeframe confirmation - Always use higher TF filter

Timeframe Quick Reference

TimeframeTrades/DayStop %Target %Win RateBest For
1m20-500.1-0.30.2-0.560%+Scalping
5m10-300.3-0.80.5-1.555-65%Scalping/Day
15m3-100.8-1.51.5-3.050-60%Day Trading
30m2-61.0-2.02.0-4.045-55%Day/Swing
1h1-51.5-3.03.0-6.040-50%Swing
4h0-22.0-4.04.0-8.035-45%Swing/Position
1d0-13.0-7.06.0-15.030-40%Position
1w0-17.0-15.015.0-30.025-35%Long-Term