Elliott Wave Oscillator Signals

Wave structure, momentum signals, Keltner Channels, and a backtest framework - all in one script.

The Elliott Wave Oscillator measures the difference between a fast and slow moving average of price, expressed as a percentage of the slow average. In the context of Elliott Wave theory, this oscillator tends to peak during Wave 3 - the strongest impulse wave - and form a lower peak during Wave 5, creating a natural divergence that signals the exhaustion of the trend. But even without an Elliott Wave framework, the oscillator is a clean, effective momentum indicator that responds reliably to trend acceleration and deceleration.

This script extends the basic EWO with a signal line crossover detection system, four distinct signal types based on both crossover direction and oscillator strength, an on-chart histogram overlay, an optional Keltner Channel framework, and a full backtest engine.


Elliott Wave Oscillator Signals

The oscillator measures the fast moving average divided by the slow moving average, minus one, scaled to percentage. A signal line - a smoothed version of the oscillator - is applied with a configurable delay period. When the oscillator crosses above the signal line, a bullish signal is generated. When it crosses below, a bearish signal fires.

Signals are further classified by the oscillator's position relative to a configurable strength threshold. A crossover that occurs when the oscillator is deeply negative - below the negative threshold - is classified as a Strong Long signal, displayed as a larger dark green label below the bar. This typically corresponds to a momentum trough where a wave reversal is most likely. A crossover above the threshold but still generating a bullish cross is classified as a standard Long signal. The same logic applies in reverse for Strong Short and Short signals on bearish crosses.

This two-tier classification allows traders to distinguish between high-conviction reversal signals at momentum extremes and routine crossovers in neutral territory - which have very different implications for trade sizing and conviction.


EWO Histogram Overlay

The oscillator histogram projects directly onto the price chart - above or below price depending on preference - using the same four-colour momentum encoding used across the dgtrd toolkit. Dark green indicates accelerating positive momentum. Light green indicates decelerating positive momentum. Light red indicates decelerating negative momentum. Dark red indicates accelerating negative momentum. The histogram height and placement are independently configurable.


Keltner Channels

An optional Keltner Channel overlay provides dynamic volatility context for the EWO signals. Three independent band multipliers (default 1×, 2×, 3×) can be enabled simultaneously, creating a multi-band channel structure around a configurable moving average basis. Band width can be calculated from Average True Range, True Range, or the simple High-Low Range. Five moving average types are supported for the basis: DEMA, EMA, HMA, SMA, and WMA.

Background fill between adjacent band pairs creates a cloud structure - light green below the channel, graduated red above - making it immediately visible whether price is trading within normal volatility, at the outer channel boundary, or in extended territory beyond the third band. Keltner Channel alerts fire when price crosses the upper or lower second and third bands.

The combination of EWO signal labels with Keltner Channel context is particularly effective - a Strong Long signal firing when price is at the lower extreme of the third Keltner band carries significantly more weight than the same signal in the middle of the channel.


Backtest Framework

The same integrated backtest engine used in the Logistic RSI script is embedded here, using EWO signal crossovers as the entry and exit triggers. Three trade modes are supported - Long Only, Short Only, and Both - with optional reversal on opposite signal, configurable stop loss, candle direction confirmation filters, and same-bar conflict avoidance.

Entry and exit labels display at each trade with full tooltips. Early warning labels flag unconfirmed signals one bar before they complete. A floating trade statistics label shows win rate, total trades, long and short win/loss breakdown, compounding capital, unrealised PnL, and active stop loss level, updating in real time.


Alerts

Four EWO alert conditions fire in two pairs - Early Warning on the unconfirmed bar and Trading Opportunity on the confirmed bar - for both long and short signals. Keltner Channel alerts fire on upper and lower band crosses. All alerts include ticker, price, and timestamp.


Oscillator smoothing method, signal delay, signal strength threshold, histogram placement and height, Keltner Channel source, MA type, length, band multipliers, ATR length, band fill, and all backtest parameters are fully configurable.