Moving averages (SMA and EMA): uses, pairings and strategy ideas
The moving average is usually the first line a trader ever puts on a chart, and it remains one of the longest-serving trend tools in the business. It smooths a stretch of prices into a single line so the broad direction of the market becomes easy to see. This page treats the simple and the exponential moving average together: how they differ, where each one fits, and how a strategy generator can compare them on your own contracts.
What it measures
A moving average takes the prices from a recent window and averages them into a line that travels along with the bars. What it really describes is where the market's recent average cost sits. When price trades above the line, most participants who entered lately are sitting in a comfortable position; when price falls below it, the opposite is true. Because the average is expressed in the same units as price, you can read the distance between the two directly on the chart.
The simple moving average (SMA) gives every bar in its window equal weight. The result is a steady line that a single large bar cannot drag around easily, but it also turns later. The exponential moving average (EMA) gives the newest prices more influence and lets older data fade away gradually. It hugs price more closely and turns sooner, at the cost of being fooled more often in noisy conditions. Neither is better in general; the right one depends on your contract and your holding time.
Whichever version you choose, a moving average is a lagging tool. It describes the move that has already happened and makes no forecast about the next one. Its value lies in turning messy price action into a clear direction and an objective reference level, so that questions like "are we in an uptrend?" or "how deep can a normal pullback go?" have repeatable answers.
How it behaves in real markets
In a directional market the average slopes steadily one way, and pullbacks often stall near the line before the trend resumes. This is what traders mean by dynamic support or resistance. When several averages of different lengths line up in order from fast to slow and the gaps between them widen, the trend usually looks healthy.
In a sideways range the averages flatten, price weaves above and below them, and a fast line and a slow line cross repeatedly. This is the hardest environment for moving-average systems: every crossing looks like a signal and most turn out to be noise in hindsight. Many traders reduce size when the average goes flat, or add a separate trend-strength condition to sit out these stretches.
The character of each contract matters as well. On liquid index futures with continuous trading, price often walks along its average for long periods. On contracts that gap frequently or swing widely within the session, the gap between price and the average can open and close abruptly. An EMA tends to feel responsive and useful in the first case and overly jumpy in the second, where the steadiness of an SMA becomes an advantage.
Common ways to use it (concepts)
Trade only on the average's side
Look for longs only while price holds above a slow average and shorts only while it stays below. The average does not time entries; it simply removes counter-trend trades, and the actual trigger comes from a pullback signal on RSI or another short-term rule.
Fast line crosses slow line
A faster average crossing above a slower one marks a shift to the long side, and the opposite cross marks a shift to the short side. It is the classic trend-following setup, often paired with ADX to confirm a trend is present and cut down on whipsaws in ranges.
Out on a close beyond the line
While a position is open, the average works as a moving exit line, and a close on the far side ends the trade. The length of the average sets how loose the exit is; some traders offset the line by a multiple of ATR so it adapts to current volatility.
Pairing it with other indicator families
Moving averages pair most naturally with tools that measure force or conviction. The average shows direction, ADX shows whether that direction has strength behind it, and MACD turns the distance between two averages into a histogram so you can see whether a trend is accelerating or fading. The three are really different views of one family, and choosing two that complement each other is usually enough.
A second pairing builds channels around the average. Bollinger Bands and the Keltner Channel both draw upper and lower edges around a central average based on volatility. Price riding the upper edge suggests a strong trend, while a return to the central line is a common place to add or enter. This keeps direction and the question of how far is too far on one chart.
Some traders also read averages next to volume-based tools. Intraday traders frequently watch a moving average together with VWAP: the first reflects the average price over a span of bars, the second reflects the volume-weighted average cost of the current session. When both point the same way, direction is clearer; when they disagree, the market is often still searching.
In AlphaPrime
Within the AlphaPrime strategy generator, moving averages usually occupy one of two seats: a direction filter that decides whether a strategy trades long, short or both, or an exit line that trails an open position. The generator also treats SMA and EMA as interchangeable options and crosses them with momentum, volatility and session rules to form a large set of candidate strategies, which the GPU backtests one by one.
That turns long-running debates, such as SMA versus EMA, or average as entry rule versus average as exit rule, into questions the data can settle. Each candidate must pass out-of-sample validation, and moving-average combinations that looked smooth over one historical stretch but break down on fresh data are removed at that stage.
The strategies that remain can be exported as strategy code for your trading platform, with the type of average and its role in the rules preserved exactly. Open them in the platform you know and you can see what each average is responsible for, then continue with simulation or preparation for live trading.
FAQ
Should I use an SMA or an EMA?
It depends on the job. An EMA reacts sooner to new prices, which suits entries or short-term exits that need to respond early. An SMA is steadier, which suits a long-horizon direction filter or a trailing line you do not want noise to knock you out of. The practical answer is to compare both on your contract and keep the one that is more consistent out of sample.
How do moving averages relate to MACD?
MACD is built from the gap between two exponential moving averages, so it can be seen as a magnified view of a crossover. The averages show where price sits relative to recent average cost; MACD shows whether the distance between a fast and a slow average is widening or narrowing.
Can a moving-average strategy be exported to my trading platform?
Yes. Moving-average combinations that pass out-of-sample validation are exported as strategy code that spells out the type of average, the direction filter and the exit line, so you can review and simulate them on your own platform before deciding whether to trade them live.

