Bull power positive means buyers pushed the bar above the average; bear
power negative means sellers pushed it below. Elder reads the pair — the
two are high − low apart by construction, so bull ≥ bear on any bar
whose range is sane, and it is their signs and slopes that carry the
signal.
Appends two columns, both warming up together on bar period − 1.
Reads high, low and close, each named by an option defaulting to its
DEFAULT_OHLCV column — the atr shape.
Which EMA, and why there is no maType
The EMA is pond's — emaValues, α = 2/(period+1) seeded on the
first sample, the same function the K2 engine's 'ema' routes to, so
elderRay's average is ema()'s average bar for bar. TA-Lib seeds on the
SMA of the first n; the macd precedent applies and the delta is
a decaying transient rather than a different indicator.
Unlike disparityIndex or priceOscillator this study takes
no maType: Elder's definition names the 13-bar EMA specifically, and
an option whose other nine settings nobody publishes is a speculative knob,
not a feature. A caller who wants high − SMA(close, 20) has
movingAverage() plus arithmetic.
Definition source
TA-Lib has no Elder Ray, so the oracle is a pandas replication of the
definition above on pond's EMA seed, with the analytic first-valid bar
asserted.
Edges
Warm-up: both columns are undefined for the first period − 1
rows (bars 0–11 at the default 13) — the EMA's own warm-up, since the
high and low legs are defined from bar 0. Length-preserving.
Linear in the input, and shift-invariant: scaling every price by k
scales both columns by k; adding a constant to every price leaves them
unchanged (it moves the extreme and the average together). Both pinned by
property tests. These are absolute quantities in price units — the
atr side of the scale pair, not the rsi side.
A leading gap in close (running over another study's output) shifts
the EMA's start, so both columns start late rather than coming back
empty.
An interior gap in close is skipped by the EMA recursion, which
carries on — but the bar itself has no average, so both columns are
missing on that bar and defined again on the next. A gap in high or
low costs only its own column on its own bar; the two legs are
independent.
A range that does not bracket the close (redirect close at a
smoothed column, say) makes bull power negative or bear power positive.
That is reported honestly rather than clamped — it is a property of the
input, not of the study.
Elder Ray Index (Alexander Elder) — how far the bar's extremes reach beyond the consensus value of price, taken as a 13-bar EMA of the close:
Bull power positive means buyers pushed the bar above the average; bear power negative means sellers pushed it below. Elder reads the pair — the two are
high − lowapart by construction, so bull ≥ bear on any bar whose range is sane, and it is their signs and slopes that carry the signal.Appends two columns, both warming up together on bar
period − 1.Reads high, low and close, each named by an option defaulting to its
DEFAULT_OHLCVcolumn — the atr shape.Which EMA, and why there is no
maTypeThe EMA is pond's — emaValues,
α = 2/(period+1)seeded on the first sample, the same function the K2 engine's'ema'routes to, soelderRay's average isema()'s average bar for bar. TA-Lib seeds on the SMA of the firstn; the macd precedent applies and the delta is a decaying transient rather than a different indicator.Unlike disparityIndex or priceOscillator this study takes no
maType: Elder's definition names the 13-bar EMA specifically, and an option whose other nine settings nobody publishes is a speculative knob, not a feature. A caller who wantshigh − SMA(close, 20)hasmovingAverage()plus arithmetic.Definition source
TA-Lib has no Elder Ray, so the oracle is a pandas replication of the definition above on pond's EMA seed, with the analytic first-valid bar asserted.
Edges
undefinedfor the firstperiod − 1rows (bars 0–11 at the default 13) — the EMA's own warm-up, since the high and low legs are defined from bar 0. Length-preserving.kscales both columns byk; adding a constant to every price leaves them unchanged (it moves the extreme and the average together). Both pinned by property tests. These are absolute quantities in price units — the atr side of the scale pair, not the rsi side.close(running over another study's output) shifts the EMA's start, so both columns start late rather than coming back empty.closeis skipped by the EMA recursion, which carries on — but the bar itself has no average, so both columns are missing on that bar and defined again on the next. A gap inhighorlowcosts only its own column on its own bar; the two legs are independent.closeat a smoothed column, say) makes bull power negative or bear power positive. That is reported honestly rather than clamped — it is a property of the input, not of the study.