Main Page > Articles > Backtesting Systems > Systematic Backtesting: Trend Following with Multiple Timeframes

Systematic Backtesting: Trend Following with Multiple Timeframes

From TradingHabits, the trading encyclopedia · 5 min read · March 1, 2026
The Black Book of Day Trading Strategies
Free Book

The Black Book of Day Trading Strategies

1,000 complete strategies · 31 chapters · Full trade plans

Trend following captures sustained price movements. Multiple timeframe analysis confirms trend strength. Systematic backtesting validates strategy robustness across market cycles.

Strategy Overview: Multi-Timeframe Trend Following

This strategy identifies trends on a higher timeframe. It executes trades on a lower timeframe. This filters out noise and improves entry timing. We focus on major currency pairs (e.g., USD/JPY, GBP/USD) or equity index futures (e.g., ES, NQ).

Setup and Indicators

We use a 200-period Exponential Moving Average (EMA) on the daily chart for trend identification. A 50-period EMA on the 4-hour chart confirms intermediate trends. The Average True Range (ATR) with a 14-period lookback helps define volatility and risk. We use 4-hour charts for entry signals.

Entry Rules

Long Entry

  1. Daily close price is above the 200-period EMA. This confirms a long-term uptrend.
  2. 4-hour close price is above the 50-period EMA. This confirms an intermediate uptrend.
  3. Wait for a pullback to the 50-period EMA on the 4-hour chart. Price must touch or come within 0.5 ATR of the 50-period EMA.
  4. Confirm with a bullish candlestick pattern. Examples include a bullish hammer or an engulfing bar at the 50-period EMA.

Short Entry

  1. Daily close price is below the 200-period EMA. This confirms a long-term downtrend.
  2. 4-hour close price is below the 50-period EMA. This confirms an intermediate downtrend.
  3. Wait for a pullback to the 50-period EMA on the 4-hour chart. Price must touch or come within 0.5 ATR of the 50-period EMA.
  4. Confirm with a bearish candlestick pattern. Examples include a bearish shooting star or an engulfing bar at the 50-period EMA.

Exit Rules

Take Profit

  1. Trail stop loss using a 3 ATR multiple from the 50-period EMA on the 4-hour chart. Adjust the stop loss every 4-hour candle close.
  2. Alternatively, target a risk-to-reward ratio of 1:2 or 1:3. This means if you risk $100, you aim for $200 or $300 profit.
  3. Exit if the 4-hour price closes below (for long) or above (for short) the 50-period EMA.

Stop Loss

  1. Long position: Place stop loss 1.5 ATR below the entry candle's low. ATR is calculated on the 4-hour chart.
  2. Short position: Place stop loss 1.5 ATR above the entry candle's high. ATR is calculated on the 4-hour chart.
  3. Move stop loss to breakeven once price moves 1R in profit. R equals the initial risk unit.

Risk Management Parameters

We risk 0.75% of total account equity per trade. Maximum open trades: 2. This controls exposure. Position sizing uses the ATR-based stop loss distance. Account size: $250,000. Risk per trade: $1,875. If stop loss distance is $25, trade size is 75 units.

Backtesting Methodology

Data Requirements

Utilize at least 10 years of historical data. Ensure data covers various market conditions, including bull, bear, and sideways markets. Use institutional-grade data feeds for accuracy. Verify split-adjusted prices for equities.

Backtesting Environment

Employ a robust backtesting platform. Examples include TradeStation or MetaTrader 4/5 with high-quality data. Program all rules without ambiguity. Incorporate variable spread and execution slippage. Assume 0.5 pip slippage for forex and 1 tick for futures.

Performance Evaluation

Analyze metrics: Compounded Annual Growth Rate (CAGR), Max Drawdown, Profit Factor, Recovery Factor, and Ulcer Index. A CAGR of 15% with a maximum drawdown below 20% is acceptable. Profit factor should exceed 1.5. Recovery Factor above 2 is desirable.

Practical Application

This strategy excels during sustained trending markets. It struggles during choppy or range-bound conditions. Monitor higher timeframe market structure for trend continuation or reversal signals. A break of the 200-period daily EMA signals a major trend shift. Reduce position size during periods of extreme volatility, e.g., economic announcements. Consider using volume confirmation for entries in equity markets. High volume on a bullish reversal candle strengthens the signal. Implement a regime filter; for example, do not trade when the VIX is above 30. This avoids high-volatility, low-direction environments. Regularly review and update the lookback periods for EMAs and ATR. Conduct monthly performance reviews. Compare actual trading results against backtest projections. Discrepancies require investigation. This strategy provides diversification within a portfolio. It complements mean-reverting systems. The objective is consistent profit capture during strong market movements.