Splits price action into Bull Power and Bear Power around a moving-average baseline to describe buying and selling pressure.
The Elder-Ray Index is a momentum tool developed by Dr. Alexander Elder and introduced in his book Trading for a Living (1993). It compares each bar's high and low to an exponential moving average (EMA) of closing prices, treating the EMA as a proxy for the market's consensus of value. The result is two separate measures: Bull Power (the high minus the EMA) and Bear Power (the low minus the EMA). Together they aim to show how far buyers pushed price above the consensus and how far sellers pushed it below during each bar. Elder typically paired the index with a 13-period EMA and often used it alongside a trend-following tool and an oscillator as part of a broader system. It is an educational analysis tool only; it does not predict future prices, is not advice to buy or sell, and trading carries risk of loss.
Elder-Ray starts with an EMA of closing prices (commonly 13 periods), which is used as a proxy for the market's average view of value. Two values are then derived for every bar. Bull Power = current high - EMA: this measures how far the bar's high reached above the consensus. Bear Power = current low - EMA: this measures how far the bar's low reached below the consensus. Both are usually plotted as separate histograms in a pane below the price chart, around a zero line. When the high is above the EMA, Bull Power is positive; when the low is also above the EMA (a strong up-move), Bear Power can be positive too. Conversely, when the high is below the EMA, Bull Power is negative, and when the low is below it, Bear Power is negative. Because the calculation depends entirely on the chosen EMA length, changing that length shifts every reading. The index is not normalized to a fixed range, so its values scale with the instrument's price and volatility.
A 13-period EMA of closing prices is the classic setting Elder used, with Bull Power and Bear Power plotted as two histograms around a zero line in a separate pane. Shorter EMAs react faster and produce noisier readings; longer EMAs smooth the output but lag more.
//@version=6
indicator("Elder-Ray Index", overlay=false)
length = input.int(13, "EMA Length", minval=1)
emaValue = ta.ema(close, length)
bullPower = high - emaValue
bearPower = low - emaValue
plot(bullPower, "Bull Power", color=color.green, style=plot.style_histogram)
plot(bearPower, "Bear Power", color=color.red, style=plot.style_histogram)
hline(0, "Zero", color=color.gray)Pro tip: Check the slope of the underlying EMA before reading the histograms. Looking at Bull Power and Bear Power in the context of an up-, down-, or flat-trending baseline tends to be more informative than reading either histogram on its own. This is for educational context, not a prompt to trade.
Educational only — not financial advice, not a recommendation to trade. No indicator is predictive; trading involves substantial risk of loss.