EMA-relative prices · Component sums · Signal timing

Bull Bear Power Pine Script: what the summed histogram hides

Bull Bear Power adds high minus EMA and low minus EMA. The result is twice the distance from the bar's high-low midpoint to the EMA of closes. A positive column does not establish that the close is above the average or that buying volume dominates. Inspect the two components before turning their sum into a trading condition.

Reduce the formula before interpreting its sign

Bull Power = High − EMA(Close, N)
Bear Power = Low − EMA(Close, N)
BBP = High + Low − 2 × EMA = 2 × (HL2 − EMA)

Both components and the sum use price units. EMA is recursive: with length 13, its update weight is 2/(13+1) = 1/7. Given previous EMA E and current close C, the new value is E + (C−E)/7. Length controls that weighting, not a hard cutoff that discards every close older than 13 bars.

Independent hypothetical bars, each starting from previous EMA 100 and length 13
High / low / closeCurrent EMABull / bearBBP
110 / 96 / 9899.71428610.285714 / −3.714286+6.571429
104 / 90 / 102100.2857143.714286 / −10.285714−6.571429
110 / 90 / 10010010 / −100
101 / 99 / 1001001 / −10

In the first row, close 98 is below EMA 99.714286 even though BBP is positive. In the second, close 102 is above EMA 100.285714 even though BBP is negative. In the final two rows, the sum is identical while the full range changes from 20 to 2. Zero means the midpoint equals the EMA, not that no volatility or trading occurred.

The fact that the high exceeds the EMA is necessary but not sufficient for positive BBP: the low can be sufficiently far below to outweigh it. The analogous statement applies to a low below the EMA and negative BBP. Neither component measures actual buy-initiated or sell-initiated trades.

Keep the components when the rule needs them

Two component pairs, +10/−4 and +8/−2, both sum to +6. In the second pair, Bull Power is lower while Bear Power is less negative. A rule about rising Bear Power cannot be reconstructed from the unchanged sum alone. The paired plots and summed histogram answer different questions.

MetaTrader's Bulls Power documentation attributes the high-minus-EMA component to Alexander Elder and his book Trading for a Living; its Bears Power documentation describes the low-minus-EMA component. TradingView documents BBP as their sum, with default length 13, and also uses the Elder-Ray name. Check the implementation instead of relying on a universal distinction between names.

The related BBP reference shows the separate component workflow. Balance of Power instead divides the candle body by its range; it is dimensionless. Elder-Ray components do not use volume. Force Index introduces volume multiplied by close-to-close change, while MACD compares moving averages; those different inputs do not establish a fixed ranking of their reliability.

Multiplying all historical prices by ten makes the first example's +6.571429 become +65.714286. The sign is preserved; magnitude is not comparable to an unrelated instrument's fixed threshold. A normalization needs its own denominator and zero-value policy. This page does not supply universal +1 or −1 thresholds.

The retained histogram example

This example uses chart high and low and an EMA of chart close. Its helper accepts high and low arguments, while the close used inside remains the chart close. The call fixes length at 13. There are no input declarations, strategy orders, alert conditions or divergence calculations.

Pine Script v6
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Pineify

//@version=6
indicator(title="Bull Bear Power", overlay=false, max_labels_count=500)

// BBP — sums high-EMA and low-EMA to measure bull and bear dominance
// Parameters: high, low, length=13 (EMA period)
p_ta_bbp(series float highSource, series float lowSource, simple int length) =>
    ema_val = ta.ema(close, length)
    bullPower = highSource - ema_val
    bearPower = lowSource - ema_val
    bullPower + bearPower

p_ind_1_bbp = p_ta_bbp(high, low, 13) // BBP with 13-period EMA

// Zero line reference
hline(0, "BBP - Zero Line", color=color.new(#787B86, 50))

// Histogram: green when BBP positive (bulls dominant), red when negative (bears dominant)
plot(p_ind_1_bbp, title="Bull Bear Power", style=plot.style_columns,
     color=p_ind_1_bbp >= 0 ? color.rgb(38, 166, 154, 0) : color.rgb(255, 82, 82, 0))
Bull Bear Power chart preview with positive and negative histogram columns

The green branch includes zero because the test is greater-than-or-equal. At exactly zero the column has no height; the reference line remains. Positive values shrinking toward zero are still positive, while negative values rising toward zero are still negative. Color describes sign, not slope. The comments' bull/bear dominance wording is shorthand for the EMA-relative price calculation, not measured order flow.

High, low and close can change while the bar is open. The histogram can cross zero and return before confirmation. There is no current-bar close gate in this example. A prior-bar reference makes the previous observation available on the next bar; it does not itself create an alert or choose alert frequency.

At EMA length 1, EMA equals close and BBP becomes high + low − 2 × close. For high 110, low 90 and close 90, the value is +20, not nearly zero. At close 110 it is −20. Shortening the length does not mathematically force a flat oscillator or a particular number of crossovers.

Separate a state, an event and a future-confirmed pivot

ObservationPrecise conditionWhat remains unproven
Positive stateCurrent BBP > 0Next-bar direction or a trade entry
Cross above zeroCurrent BBP > 0 and previous BBP <= 0Execution price or profitable follow-through
Rising negative readingPrevious −6, current −2A positive state; current value is still below zero
Potential bearish divergenceLater price high higher, matched BBP high lowerA future reversal; pivot matching and confirmation are separate

A transition from −2 to 0 changes this script's color branch to green without a strict cross above zero. A later move from 0 to +1 is a cross above zero even though the preceding branch was already green. Count numeric events rather than color transitions.

A swing-high detector requiring five bars to the right identifies a candidate at bar 30 no earlier than bar 35. Drawing a marker back on bar 30 must not give a strategy information at bar 30. Price and oscillator pivots also need an explicit matching rule; independently detected peaks need not occur on the same bar.

Adding an RSI crossing means deciding whether both crossings must happen on the same completed bar or whether one may precede the other by a defined number of bars. A vague claim of confluence hides that choice. No reduction in false signals is established by merely combining indicators.

Build a testable request from the arithmetic

  1. Record symbol, session, chart type, timeframe, EMA length and enough initial history. Compare the EMA and both components on the same closed bars.
  2. Confirm the identity BBP = 2 × (HL2 − EMA), including the two opposite-close examples and the zero-sum examples above.
  3. For an illustrative crossover study, define a confirmed cross above zero, an optional close-above-SMA(200) condition, and the next eligible execution time. These are research choices, not an established best configuration.
  4. Specify an exit rule independently. A 1.5 × ATR distance with ATR 2 is 3 price units; an assumed entry 100 and stop reference 97 do not guarantee execution at 97. A fill at 95 loses 5 per unit before costs.
  5. Compare 8, 13 or 21 only on the same recorded dataset and event definition, then evaluate dates excluded from selection. A five-minute chart still supplies bars to the EMA; no hard minimum timeframe follows from this formula.
  6. Include fees, spread, slippage and trade count. Indicator sign or syntax success alone establishes no win rate or expected return.

Ask the Pine Script AI Coding Agent for explicit length inputs, optional component plots and a defined confirmed-bar alert. Account access and usage depend on the selected product. Review generated source, compile it and verify the arithmetic before interpreting alerts.

Specify a BBP adaptation

Bull Bear Power questions

For this summed version, the high-low midpoint is above the EMA of closes. It does not require the close to be above the EMA, nor the low to be above it. The exact identity is BBP = 2 × (HL2 − EMA).

No. A negative reading says the high-low midpoint is below the EMA. The open does not enter the formula. Candle direction, close-to-close return and BBP sign can disagree.

Bull Power and Bear Power come from Alexander Elder's EMA-relative framework. TradingView's Bull Bear Power sums the two. Keeping the components separately preserves information lost by their sum; naming conventions differ between platforms.

The copied source fixes the EMA length at 13 and has no input declarations. TradingView's built-in BBP and Pineify's builder expose length settings. Neither 13 nor an alternative such as 8 or 21 is established here as optimal.

No. At length 1 the EMA equals close, so BBP = high + low − 2 × close. That is zero only when close equals the high-low midpoint. A close at the low gives BBP equal to the full range, even with length 1.

No. The example plots a histogram and zero line. It has no alertcondition, pivot detection, strategy orders or bar-close gate. Define those additions explicitly before asking for generated code.

BBP is in price units. Multiplying a price history by ten also multiplies the EMA, both components and BBP by ten. A fixed threshold of 1 therefore has no universal interpretation across instruments or price scales.

No. It uses high, low and an EMA of close. Volume and trade aggressor classification are absent. The bull/bear terminology is an interpretation of price positions, not a measurement of buyer or seller counts.