VALYNOXSTRATEGY RESEARCH TECHNOLOGY
AlphaPrimeAlphaPrime
ACADEMY / Indicators and signals

Swing trading indicators: what to use and how to test them

Swing traders mostly combine one trend, one momentum and one volatility indicator. No combination is best by default. Compare combinations on daily bars with costs and gap fills, then check them on data they were not built on.

By · Published · updated · Editorial policy

Contents
  1. Which indicators do swing traders actually use?
  2. What do trend, momentum and volatility indicators each do?
  3. How do you avoid redundant indicators?
  4. Why do daily bars, holding periods and overnight gaps change the test?
  5. Which combination is best, and how do you compare them fairly?
  6. How do out-of-sample and walk-forward checks fit in?
  7. What can indicator testing tell you, and what can it not?
  8. Frequently asked questions
  9. References

Which indicators do swing traders actually use?

Swing traders mostly use moving averages for trend, RSI or MACD for momentum, and ATR or Bollinger Bands for volatility. No single indicator is best. A combination is worth a closer look only if it beats simpler versions after commission and slippage, on daily bars with realistic gap fills, and keeps working on data it was not built on.

Swing trading is a style that holds a position for a few days to a few weeks to catch one move, or "swing", in price. It sits between day trading, which closes every position before the session ends, and position trading, which holds for months. The five indicators below appear in most swing setups. Each one has a standard default setting that most charting platforms use.

IndicatorRoleWhat it measuresCommon defaultTypical swing use
Moving averagesTrendThe average price over the last N bars20, 50 or 200 barsTrade only in the direction of the trend
RSIMomentumRecent up moves compared with down moves, on a 0–100 scale14 barsBuy a pullback in an uptrend
MACDTrend and momentumThe gap between a fast and a slow exponential moving average12, 26, 9Time the turn after a pullback
ATRVolatilityThe average size of a bar, including gaps14 barsSet the stop distance and position size
Bollinger BandsVolatilityBands set around a moving average at a distance based on the standard deviation, a measure of how far closes usually stray from their average20 bars, 2 standard deviationsFind stretched prices or quiet periods

What do trend, momentum and volatility indicators each do?

Each role answers a different question, so a useful swing setup takes one indicator from each role. Think of a car trip. The trend indicator tells you which way the road goes. The momentum indicator is the speedometer: it shows whether the car is speeding up or slowing down. The volatility indicator tells you how bumpy the road is, so you know how much room to leave.

  • Trend answers "which direction?" A common filter is: take long trades only when the close is above the 50-day moving average.
  • Momentum answers "when?" Inside an uptrend, a short dip in RSI can mark a pullback entry.
  • Volatility answers "how far?" A stop at a multiple of ATR stays wide in wild markets and tight in calm ones, so you risk a similar amount per trade.
One indicator per role: a trend indicator such as the 50-day moving average shows which way to trade, a momentum indicator such as an RSI dip shows when to enter, and a volatility indicator such as an ATR stop shows how far away the stop goes One indicator per role Direction, timing, stop distance Trend Which way? Momentum When? Volatility How far?
One indicator per role: trend picks the direction, momentum picks the timing, volatility sets the stop distance.

How do you avoid redundant indicators?

Two indicators from the same family usually give you one opinion twice, not two opinions. Many indicators are built from the same inputs, so they rise and fall together.

  • RSI, Stochastic and Williams %R all measure where the close sits relative to recent price action. On most charts they reach extremes at nearly the same bars.
  • MACD and a moving-average crossover are closely linked. The MACD line is the 12-bar EMA minus the 26-bar EMA, so it crosses zero exactly when those two averages cross.
  • Bollinger Bands and ATR both measure volatility. One uses standard deviation of closes, the other uses true range, but they widen and narrow in the same periods.

A simple check: count how often two signals agree on the same bars. If they almost always agree, drop one. Redundant indicators make a chart look more certain than it is. In a test they also add parameters, and every extra parameter gives the optimizer another way to fit noise.

Why do daily bars, holding periods and overnight gaps change the test?

Swing trades live through closes, nights and weekends, so the backtest must handle gaps and next-bar fills correctly. A day-trading test can ignore overnight risk. A swing test cannot. Swing tests need the setup that the backtesting in AlphaPrime (Valynox) gives, with the data resolution you choose and fills always on the next bar, so gaps and weekends are carried properly.

  1. Decide which session closes the daily bar. Futures trade across several sessions. A daily bar built from the full session and one built from the day session alone can have different opens, highs, lows and, in some markets, closes, and so different indicator values.
  2. Act on the next bar. An indicator calculated on today's close can only trigger an order for the next bar. A test that fills at the same close it used to decide is using a price you could not trade.
  3. Fill gaps at the open. If price opens beyond your stop, the real fill is at or near the open, not at the stop price.
  4. Handle contract rolls. A continuous futures series joins expiring contracts. An unadjusted roll creates a false gap that can trigger moving-average and ATR signals that never happened in the traded contract.
  5. Expect few trades. A daily-bar swing strategy trades far less often than an intraday one, so it needs many years of history before the results mean much.

Hypothetical example

A long swing trade enters at 900 points with a stop at 860, which is 40 points below entry. After a weekend, the market opens at 830. A backtest that fills the stop at 860 records a 40-point loss. A realistic test fills at the open and records a 70-point loss. Over many trades, ignoring gaps like this makes the strategy look smoother than it is.

A hypothetical weekend gap: a long trade from 900 has its stop at 860, Monday opens at 830, so a fill at the stop showing a 40-point loss is not real and the realistic fill at the open loses 70 points The gap skips your stop Long at 900, weekend gap, hypothetical Fri Mon Stop fill: −40 (not real) Open fill: −70 (real) A gap fills at the open. So: model gap fills at the open.
The hypothetical gap above: when price opens below the stop, the fill is at the open, not at the stop price.

ATR helps here because it includes gaps in its range. A stop sized with ATR for stops and position size leaves room for the gaps that are normal in that market.

Which combination is best, and how do you compare them fairly?

There is no best indicator combination in general; there is only the one that holds up best for your market, timeframe and costs. To find out, test every combination with the same data, the same execution rules and the same costs, and always include a simple baseline.

The baseline is usually the trend filter alone. If adding RSI and Bollinger Bands does not clearly beat "long above the 50-day average" after costs, the extra indicators are decoration. Judge each version by its net average trade:

Average trade after costs = average trade before costs − round-trip cost

The gross average trade is the total result before costs divided by the number of trades. The round-trip cost is commission and fees for the entry and the exit, plus slippage on both sides. Extra entry conditions often add trades with smaller moves, and costs eat small moves first.

Hypothetical example

Three combinations on ten years of daily bars of one index future, with a round-trip cost of $40 per contract:

CombinationTradesGross avg tradeNet avg tradeNet avg trade, held-back period
A: 50-day moving average filter only150$300$260$210
B: A plus RSI pullback entry300$180$140$120
C: B plus Bollinger Bands and MACD600$90$50−$10

C looked busiest and most detailed, but after costs and on unseen data it was the weakest. A, the simplest version, has the best net average trade both in the test and on the held-back period, so it stays the one to beat. Adding RSI in B did not earn its place, and C failed on unseen data.

Hypothetical average trade per contract for three combinations: A with the moving average only makes 300 gross, 260 net and 210 net on held-back data; B adding RSI makes 180, 140 and 120; C adding two more indicators makes 90, 50 and minus 10 dollars More indicators, less edge Avg trade per contract, $, hypothetical Gross Net Held-back 300 260 210 180 140 120 90 50 −10 A: MA B: +RSI C: +2 more C failed on unseen data. So: beat the simple baseline first.
The hypothetical comparison above: more indicators gave more trades, a smaller edge per trade, and the worst result on unseen data.

How many combinations you test matters as much as which one wins. Sullivan, Timmermann and White (1999) showed that when many technical trading rules are tested on the same data, the best of them can look strong purely by chance. Keep a count of every version you try. In AlphaPrime, strategy generation lets you set the indicators, parameter ranges and entry and exit conditions as the search space, and AlphaPrime's backtesting evaluates every candidate with the same fees, slippage, next-bar execution and trading sessions.

How do out-of-sample and walk-forward checks fit in?

A combination you picked on one stretch of history has to be checked on history it never saw. Out-of-sample data is data the strategy's rules and settings were not chosen on. Walk-forward analysis is a test that repeatedly tunes a strategy on one window of history and then trades it unchanged on the next window.

  1. Fix the indicator families, parameter ranges, costs and ranking measure before you look at any result.
  2. Set aside the most recent part of the history and do not touch it.
  3. Run walk-forward analysis on the rest. Make each in-sample window long enough to hold a useful number of trades, often 30 to 50 at least. With daily bars, that means windows of several years.
  4. Check how many out-of-sample windows were positive, whether the chosen parameters stay similar from window to window, and whether the result survives double slippage.
  5. Only then run the held-back period, once.

The guide to walk-forward analysis and window choice covers the windows in more detail. AlphaPrime's strategy validation includes walk-forward analysis, with Basic, Standard and Extensive levels and custom thresholds. Bailey, Borwein, López de Prado and Zhu (2014) showed why this step matters: after enough trials, an excellent in-sample result is easy to find even when the strategy has no edge.

What can indicator testing tell you, and what can it not?

A careful test can rule a combination out, but it cannot prove that one will work in the future. Use the results to narrow the list, not to predict returns.

A careful test can tell youA careful test cannot tell you
Whether the edge per trade covers realistic costsWhether that edge will continue next year
Whether an added indicator improves on a simpler baselineWhy the pattern existed, or whether it was luck
How large past drawdowns and gap losses wereThe size of the next drawdown
Whether results hold on data the rules were not built onHow a market regime that is not in your history will behave

What this means if you use AlphaPrime: define one indicator per role as the search space, keep costs in every evaluation (next-bar execution always applies), and let walk-forward validation decide which combinations stay in the databank. Judge each result against the simplest baseline you also tested.

Frequently asked questions

What is the best indicator for swing trading?

No single indicator is best for every market and timeframe. Most swing traders combine a trend indicator such as a moving average, a momentum indicator such as RSI or MACD, and a volatility indicator such as ATR. The right mix is the one that beats a simple baseline after costs and on out-of-sample data in your own market.

How many indicators should a swing trading strategy use?

Two or three is common: one for trend, one for timing and one for stop distance. Each extra indicator adds parameters and more ways to fit noise. Add one only if it measures something the others do not and it improves the net average trade in a fair comparison.

Which timeframe is best for swing trading indicators?

Daily bars are the most common choice, because swing trades last days to weeks. Some traders use 4-hour or 60-minute bars for entry timing. Whatever the timeframe, test it with next-bar execution, realistic gap fills and the same costs for every version.

Why do swing trading backtests need so much history?

A daily-bar swing strategy makes relatively few trades, so a short history gives too small a sample to judge. Walk-forward windows also need enough trades each, which with daily bars means several years per window. Longer history also covers more trending, ranging and high-volatility periods.

References

  • Sullivan, R., Timmermann, A., & White, H. (1999). Data-Snooping, Technical Trading Rule Performance, and the Bootstrap. The Journal of Finance, 54(5), 1647–1691.
  • Bailey, D. H., Borwein, J., López de Prado, M., & Zhu, Q. J. (2014). Pseudo-Mathematics and Financial Charlatanism: The Effects of Backtest Overfitting on Out-of-Sample Performance. Notices of the American Mathematical Society, 61(5), 458–471.