VALYNOXSTRATEGY RESEARCH TECHNOLOGY
AlphaPrimeAlphaPrime

WaveTrend oscillator: distance from average in units of normal stretch, two lines and strategy ideas

WaveTrend is a momentum oscillator that asks how far the typical price has drifted from its own smoothed average, and then judges that gap against how large it usually is. The answer is drawn as a fast main line and a slower signal line that swing around a zero line. This page walks through the calculation in plain words, how the two lines behave in trends and ranges, how to choose the settings, and what you can adjust when AlphaPrime tests WaveTrend on your own contracts.

FamilyMomentum
Output shapeFast and slow line around zeroNo fixed ceiling or floor; scaled by recent stretch
In AlphaPrimeBuilt-in generator familyEntry, exit and filter rules on the main and signal lines

What it measures

WaveTrend describes stretch. On every bar it looks at the typical price, an even blend of the high, the low and the close, and sets it against a smoothed average of that same typical price. A positive reading means price is trading above its average, a negative reading means it is trading below, and the size of the reading tells you how unusual that gap is for this market at this moment. The output comes as a pair: a responsive main line and a slower signal line that trails it.

In words, the public calculation runs in a few steps. First it takes an exponential average of the typical price over a channel length. Next it measures, bar by bar, how far the typical price sits from that average while ignoring direction, and smooths those distances with a second exponential average of the same length; that gives the usual size of the gap. It then divides the current gap by that usual size, with a small scaling constant, so the result is expressed in units of normal stretch rather than in points. A further exponential average over a longer span smooths this ratio into the main line, and a short simple average of the main line becomes the signal line. We could not confirm a single documented inventor; the version most traders use comes from a widely used public script shared in charting communities, and its scaling step closely follows the one in the Commodity Channel Index (CCI).

That scaling is what sets WaveTrend apart from a range-position tool such as the Stochastic oscillator. Stochastic asks where the close lands between the recent highest high and lowest low, so it is tied to the edges of a box. WaveTrend asks how far price is from a moving centre, measured against its own recent wobble. When the market goes quiet the usual gap shrinks, so a modest move can produce a large reading; when the market turns wild the same move in points produces a smaller one. The line follows the market's current rhythm rather than a fixed price box, and it has no hard ceiling or floor.

Concept sketch (not real market data)

How it behaves in real markets

In a sideways market the main line swings from one side of zero to the other with a fairly regular rhythm, and readings far from zero tend to fade as price drifts back toward its average. This is where WaveTrend's extremes carry the most meaning, because the average itself is roughly flat and a stretch away from it has somewhere to return to. In a directional market the picture changes. The average keeps travelling with the trend, price keeps leading it, and the main line can stay on one side of zero for a long stretch, dipping toward the zero line on pullbacks instead of crossing it.

The most common misuse is reading every extreme as a reversal. A deep reading only says that price is unusually far from its average compared with recent behaviour; during a strong trend that is exactly what a healthy move looks like, and the line can stay stretched, ease back a little and stretch again while price keeps going. Fading those readings means standing in front of the move again and again. The second misuse is acting on every cross between the fast and slow lines. When the signal period is short, the signal line is only a short average of the main line, so the two cross often, above all when the main line is flat near zero in quiet trade. Most of those crosses say very little. Traders who rely on crosses usually keep only the ones that come after the line has travelled well away from zero, or only the ones that agree with the larger trend.

Choosing the settings is a trade-off between speed and noise. A shorter channel length lets both the average and the usual gap adapt quickly, so the line reaches extreme territory more often and reacts sooner to each new bar, at the cost of more false swings. A longer channel length gives a steadier centre and a steadier yardstick, so extremes are rarer and more telling but arrive later. The final smoothing step decides how much lag the main line carries, and the signal period decides how tightly the slow line hugs the fast one: a short signal period means frequent crosses, a longer one fewer and later crosses. Judge a setting by how stable the results stay across neighbouring choices, not by one standout combination.

Common ways to use it (concepts)

Mean reversion

Hook back from stretched territory

In a range-bound market, wait for the main line to travel well away from zero and then cross back through its signal line. The cross shows that the stretch has stopped growing, a more patient entry than fading the reading itself.

Trend filter

Trade on the side of the zero line

Take long setups only while the main line is above zero and short setups only while it is below. WaveTrend is not the trigger here; it confirms that price is trading on the expected side of its own average.

Divergence

A push that stretches less

Price sets a new high, but the main line peaks lower than before, so the latest push carried price less far from its average in units of normal stretch. Traders read this as fading energy and wait for confirmation before acting.

Pairing it with other indicator families

WaveTrend tells you how stretched price is, not whether the market is trending. A trend-strength reading such as ADX or the Choppiness Index answers that second question, so a rule can fade extremes when the market is ranging and follow the zero line when it is trending. That single switch addresses the main misuse described above.

Because WaveTrend already scales itself by recent stretch, adding ATR does not repeat the same information: ATR sizes stops and targets in points, while WaveTrend times the entry. The slope of a moving average on a higher timeframe is another simple way to decide which side of the zero line deserves attention.

Pairing it with other oscillators deserves some thought. MACD also compares price with its own averages, so the two often agree and add little to each other. RSI weighs the balance of gains against losses instead of distance from an average, so asking both to agree is a more independent check.

In AlphaPrime

In AlphaPrime, WaveTrend is a building-block group of its own, listed as WaveTrend in the momentum family. Two inputs can be adjusted. The indicator period sets how many bars the indicator is calculated over, and the signal period sets how many bars the signal line is smoothed over. The indicator period plays the role of the channel length, and the longer smoothing step follows it in proportion.

The conditions are named in plain words on both lines. On the main line you will find rules such as WaveTrend main crosses above the signal, crosses below the signal, crosses above zero, is above zero, crosses above the level, is above the level, turns up and is rising, each with its mirror image. The signal line has its own is rising and is falling conditions. Any of them can act as an entry condition, an exit condition or a filter, and the generator pairs them with rules from trend, volatility, volume and session families.

Each combination is backtested on your market, and you can set out-of-sample validation thresholds, so you keep only combinations that still hold up on data they have never seen and find out whether a hook from stretched territory, a zero-line filter or a signal cross really works on your contract and timeframe. Combinations that pass can be exported as strategy code for trading platforms.

FAQ

How is WaveTrend different from the Stochastic oscillator?

The Stochastic oscillator places the close inside the recent high-low range. WaveTrend measures the distance between price and its own smoothed average, scaled by the usual size of that distance, so it adapts to how calm or wild the market is and has no fixed ceiling or floor.

Is every extreme WaveTrend reading a reversal signal?

No. An extreme reading means price is unusually far from its average, and in a strong trend that can last for many bars. Many traders act only once the main line crosses back through its signal line, and only when a trend filter says the market is ranging.

Can a WaveTrend strategy be exported to a trading platform?

Yes. When a combination found by the strategy generator passes out-of-sample validation, it can be exported as strategy code for trading platforms, where you can keep testing it.