Bull and Bear Power

Bull and Bear Power

The financial markets are often described as a constant tug-of-war between buyers (Bulls) and sellers (Bears). Understanding who is currently winning this battle is the key to identifying trends and potential reversals.

The Bull and Bear Power indicator by LefAlgo is a sophisticated evolution of Dr. Alexander Elder’s classic Elder-Ray Index. While the original concept separates Bull Power and Bear Power into two different histograms, this version combines them into a single, comprehensive oscillator. Furthermore, it introduces a normalization algorithm that allows traders to gauge the intensity of the move relative to recent history, regardless of the asset’s price scale.

How it Works

The core logic of this indicator relies on the relationship between the price extremes (High and Low) and an Exponential Moving Average (EMA).

  1. Bull Power: Calculates the ability of buyers to push prices above the average consensus (High - EMA).

  2. Bear Power: Calculates the ability of sellers to push prices below the average consensus (Low - EMA).

  3. Net Sentiment: The indicator sums these two values to derive a net result (bbP).

If the result is positive, the Bulls are exerting more force. If negative, the Bears are in control.

Key Features

What sets LefAlgo’s version apart are two specific enhancements found in the code:

1. Adaptive Normalization Raw values can be difficult to interpret when switching between assets with different prices (e.g., EUR/USD vs. DAX). This indicator includes a normalization feature (isNormalized).

  • When active, the code tracks the highest and lowest values of the oscillator over the lookback period.

  • It then re-scales the current value to a range, making it easier to identify overextended conditions visually.

2. Signal Smoothing The indicator plots a Signal Line (displayed in blue). This is a moving average of the Bull/Bear power itself. This line helps filter out market noise and provides clearer crossover signals for trend following.

Configuration & Settings

You can modify the following variables in the indicator settings window to fit your trading style:

  • lengthInput (Default: 50): The number of periods used for the baseline Exponential Moving Average. Increasing this value makes the indicator less sensitive and better suited for long-term trends.

  • maLength (Default: 50): The length of the Signal Line (Moving Average of the oscillator). A lower value will make the signal line hug the histogram closer, while a higher value will smooth it out.

  • isNormalized (Default: 1): A switch to toggle normalization.

    • 1: Normalization is ON. The indicator adapts to the recent volatility range.

    • 0: Normalization is OFF. The indicator displays raw price values.

Trading Application

  • Zero Line Crossovers: The most direct signal is the crossover of the zero line. When the histogram turns Green (crosses over 0), it indicates that Bullish pressure has overcome Bearish pressure. Conversely, a switch to Red (crosses under 0) suggests the Bears have taken control.

  • Trend Strength: The height of the histogram bars represents the intensity of the trend. In the normalized mode, extreme readings may suggest a potential exhaustion of the current move.

  • Signal Line Filtering: You can use the blue Signal Line as a filter. For example, only taking long positions when the histogram is above the Signal Line.

The Code

You can copy and paste the following code into your ProRealTime platform window:

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

avatar
Register or

Likes

avatar
Related users ' posts
YvesRobert Hello Ivan, I see that you are very good in PRT coding. Is it possible to have a code who se...
Iván Hi. It is not possible to detect true absorptions with ProBuilder code. The PRT language doe...
BZH22 Bonjour Ivan je suis à la recherche d' un indicateur pour avoir des points d' entrées et de...
Marc Boliart Hi! i do not know why _v.1.1"] was on 1st line, remember to remove it!
sam00075 Accuracy is on point.
Mubin1308 Bonjour à tous, J'ai importé le fichier mais ça ne marche pas, rien qui s'affiche. Pourriez...
hdb1 Thank you so much Ivan..Been using this on 30min timeframe with excellent results. Now my ma...
Iván
1 year ago
Madrosat Bonjour ivan Quelle différence il y a t il entre Extra trend et ultra trend lequel est le p...
luxrun grazie Ivàn!
lee Thank you. Is it possible to convert this to a screener that displays instruments when bulli...
Iván //---------------------------------------------------------------// //PRC_Pollan Indicator /...
okeus Ciao, il tuo lavoro è incredibile, ti chiedo una cortesia è possibile veder un grafico con ...
kats BONJOUR je lai mis sur du renko , il est complexe car toujours a l'envers??? Peut être ne ...
RTR Great tool again and great job, thank you! So from what I see everytime Z-Score is over 0 m...
yas hi ivan I have logged this last week if when you get a chance if this can be converted ple...
Bernard13 (Je réécris mon commentaire -français- en français car certains mots ne correspondaient pas ...
Iván 1000 indicateurs !!! brutaux
atlante hi nicolas this indicator have 2 wrong borderline and islalastbarupdate. thank you can you h...
Nicolas That'"s because you are not using PRT v11? Just remove lines 59 to 62
robertogozzi An updated version can be found here https://www.prorealcode.com/topic/conversion-of-pine-sc...
jissey Bonjour Robertogozzi, cet indicateur est interessant mais serait-il possible de marquer la ...
robertogozzi Sure, but you should start a new topic on the Probuilder support forum. Thank you :)
robertogozzi I don't actually know what they are calculating. As soon as I know, I will post further info.
robertogozzi It's because they calculate future bars, that's why it's not possible to use that indicator ...
poldoposta si potrebbe trovare una soluzione per sovrapporlo al prezzo?
robertogozzi Basta che tu clicchi sull'etichetta (tag) PREZZO del grafico (appena sotto l'angolo in alto ...
FernetTrader think i found a solution!
monochrome Thanks for the indicator. Very interesting!
monochrome Can you please share how you made it work? I cant seem to make it work in a strategy
oliverkeim Hi, also here not working. Only white lines.
killerplatuze Dont work anymore with the current version?
KryptoKat tolle Arbeit, professionell
Maz
9 years ago
Francesco78 very nice, thanks!
Wilko Interesting! Thanks for sharing!
BjornH Extremely nice, thanks!

Top