EMA Wave Indicator: Formula, Settings and Test Design
EMA Wave plots three smoothed differences between a price source and exponential moving averages. It helps you inspect how price sits relative to averages with different lookback lengths. It does not establish that a reversal is coming or that a trade will be profitable.
This guide describes the implementation available in Pineify. If you use another script called EMA Wave, check its source, inputs and version before applying these settings. The name alone does not guarantee matching calculations.

What each wave measures
For each wave, subtract its EMA from the selected price source, then smooth that difference with an SMA. Pineify's defaults are:
| Input | Default | Role |
|---|---|---|
| Price source | HLC3 | Average of each bar's high, low and close |
| Wave A EMA length | 5 | Shortest lookback |
| Wave B EMA length | 25 | Intermediate lookback |
| Wave C EMA length | 50 | Longest lookback |
| SMA smoothing length | 4 | Smooths each price-minus-EMA series |
| Spike cutoff | 10 | Threshold for optional ratios between waves |
The wave values retain the price source's units; they are not normalized percentages or scores bounded between fixed limits. A reading of 2 therefore has a different scale on a low-priced stock and a high-priced futures contract. All three lengths normally use the same chart interval. They are three lookbacks, not three independent timeframes.
A positive wave means its smoothed price-minus-EMA difference is positive. A negative wave means it is negative. An increasing positive wave and a negative wave moving toward zero are different states; inspect the sign and the change separately.
The optional spike flags compare Wave B with Wave A and Wave C with Wave B, subject to nonzero denominators. A ratio can become large when its denominator is close to zero. A highlighted spike is a calculation condition, not proof of exhaustion or a forecast of a price reversal.
Add the indicator and check its output
Pineify includes EMA Wave in its indicator configuration. Use the Visual Pine Script Editor to configure the indicator and inspect the generated source. Availability depends on the account and plan. The existence of a generation workflow does not certify the resulting script's behavior or trading performance.
When using an AI coding workflow, specify the source, all three EMA lengths, SMA smoothing, plot location and spike rules. Request a syntax check and review the result. A short prompt such as "make three waves" leaves important choices unspecified.
Open TradingView's Pine Editor, review the script and add it to the chart. Compare selected bars with the stated formula and confirm which settings are active. Use closed bars for an initial comparison; values on an open bar can change with incoming prices. TradingView's strategy documentation explains why an indicator display alone does not produce a strategy report.
Turn a visual pattern into a testable rule
Possible research conditions include all waves above zero, all below zero, or the shortest wave changing direction. None has an established win rate here. Adding more conditions can reduce the number of signals without improving their outcome.
For example, an all-positive condition with a rising Wave A is a defined signal to investigate. It is different from a crossover: the condition can remain true on consecutive bars. Decide whether to act only when it first becomes true, whether to allow repeated entries, and how to handle an existing position.
A price high accompanied by a lower wave high is a divergence description. If identifying a high requires later bars to confirm a pivot, the signal was not available at the earlier pivot bar. Record the confirmation time rather than treating hindsight as an early entry.
Compare settings without claiming an optimum
The following are illustrative parameter sets for sensitivity testing, not settings validated for a market or recommended because of measured performance:
| Research variant | Wave A | Wave B | Wave C | Smoothing |
|---|---|---|---|---|
| Short lookbacks | 3 | 12 | 26 | 2 |
| Intermediate lookbacks | 8 | 34 | 89 | 5 |
| Long lookbacks | 12 | 50 | 200 | 8 |
Keep the 5/25/50, smoothing-4 default as a separate baseline. Test a small set chosen before looking at the results. Changing the chart interval changes the elapsed time represented by every lookback, even when the numbers stay the same.
Use the same symbol, session, date boundaries, position sizing and cost assumptions when comparing variants. Preserve a later period that was not used to select settings. A result from a daily stock chart does not establish an appropriate setting for intraday crypto or forex.
Build a reproducible backtest specification
The existing fragment below expresses two Boolean conditions and is retained as a signal example. It assumes that wave_a, wave_b and wave_c have already been defined. It is not a complete strategy, does not place orders, and is not evidence of a completed backtest.
// Long Entry
long_signal = wave_a > 0 and wave_b > 0 and wave_c > 0 and wave_a > wave_a[1]
// Short Entry
short_signal = wave_a < 0 and wave_b < 0 and wave_c < 0 and wave_a < wave_a[1]
Before running a test, specify the parts missing from that fragment:
- Record the script version, source, wave inputs, symbol, exchange, chart interval and test dates.
- Evaluate the condition at a stated time, such as bar close. Define whether the next eligible entry is a simulated market order or another order type.
- Choose one exit rule with an exact trigger. If several exits compete, define their priority and check same-bar cases in the trade list.
- Set position sizing, pyramiding, commission, slippage and treatment of open trades at the end of the test.
- Export all simulated trades and reconcile entry timestamps, exit timestamps and P/L against the chart.
For a 1-hour versus 4-hour comparison, keep the economic assumptions aligned and report each sample's trade count. The two schedules can create different holding periods and exposure, so a win-rate difference alone does not isolate signal quality.
Report net P/L after costs, average gain and loss, maximum drawdown, exposure and the distribution of outcomes. Set any acceptable risk limits before selecting the best result. A win-rate target, profit-factor threshold or drawdown ceiling is a research decision, not proof that EMA Wave reaches it. This article provides no verified SPY performance result or preferred timeframe based on such a result.
Questions about EMA Wave
Is it better than MACD?
EMA Wave and MACD use different transformations of moving averages. A visual preference does not establish an advantage. Compare complete strategies with matching exits, sizing and costs, rather than comparing selected chart signals.
Can it be used on crypto or forex?
It can calculate waves from a supported price series. Whether a rule remains useful depends on the data, session, costs and execution assumptions. There is no verified universal adjustment such as reducing every period by a fixed percentage for crypto.
Does waiting for all waves to agree avoid false signals?
Agreement describes the current calculation. It can delay entries and miss some moves, while still producing losing trades. Define a false signal and measure it over the full sample before concluding that a filter helps.
Is EMA Wave a standalone trading system?
No. It supplies indicator values and optional flags. A system also requires entry timing, exits, position sizing and execution rules. Keep those rules fixed when evaluating what the wave adds.

