This indicator is mainly based on the popular indicator “Elder ray” made by Dr . Alexander Elder in 1989. This indicator has been developed in order to determine the strength of the competing groups of buyers and sellers in the markets.
To measure the competing power of bulls and bears, the indicator compares the current high (maximum power of the bulls) and current low (maximum power of the bears) to the average price using a .
Bull Power = Current High – 13 (closing)
Bear Power = Current Low – 13 (closing)
This Elder ray indicator can also tell us more information about market conditions :
- If the current high and current low are above the 13, the bulls are totally in control on the market
- If the current high and current low are under the 13, the bears are totally in control of the market
- If the 13 is in between of the current high and current low, there is strong fight about controlling the market, there is possible reversal in this configuration
- Fast MA Period : Fast moving average period (only used for buy sell signal)
- Slow MA Period : Slow moving average period (only used for buy sell signal)
- Display candle labels : Show/hide candle labels on the chart
- Display only bear labels above X : Exclude all top candle labels on the chart below the value specified.
- Display only bull labels above X : Exclude all bottom candle labels on the chart below the value specified.
- Display opposite values : Show all candle labels on top ( ) and bottom ( ) or only show the candle labels for the winning force on the candle.
- Display box for last candle : Show/hide the dominance boxes (red and blue) after last candle showing the last bear and bull power.
- Display box after X candles : How many candles in the future the dominance boxes should be displayed.
- Display slow / fast crossover (o) : Display crossover signals (circles) between fast line and slow line.
- Display bear / bull fighting (x) : Display fighting signals (crosses) between bull and bears.
This indicator has 3 possible complementary visualizations:
- Candle labels : The labels on top are the percentage of the bears on the candle, while the labels on the bottom are the percentage of the bulls on the candle. When the bulls are winning the labels are blue, when the bears are winning the labels are red, silver otherwise.
- Box after last candle : The blue and red boxes after the last candle are the percentage of bears and bulls on the last candle of the chart. That boxes can be disabled in the settings if you feel it is redundant with the labels.
- Signals : The signals are displayed at the bottom of the main area of trading. The orange “x” represents an area where bulls and bears are fighting hard. The blue “o” represents a buy signal (fast line crosses over the slow line) and the red “o” represents a sell sinal (fast line crosses under the slow line).
The most important rule in the usage of this indicator is :
“The higher the current bull power is (or bear power), the higher the chances are the next candle will also be (or ).”
When the prices is increasing, it is very interesting to follow the bull power to verify that it is either stable or increasing. If the bull power keeps decreasing candle after candle, there is chances that in the next candles there will be a reversal.
When there is orange crosses in the signal area (bottom of the screen), it means that there is a big fight between bulls and bears and that the current price of the asset is probably stable. During these fighting areas, reversals are more likely to happen.
When there is a blue circle in the signal area (or red signal), it can be considered as a buy signal (or sell signal). These signals are determined by the crossover of the fast and slow lines of the total power of the bulls plus the bears.
As Pine script only allows to display about 50 drawings on the chart, the labels on the candles can not be printed on all the historical candles. The option “Display opposites” could be useful to hide unnecessary labels and then be able to display more older labels.
As the Elder ray indicator uses an average price ( 13 of closing price), the indicator may be lagging in some situations, but most of the time it will help to filter the bad signals contrary to the indicators that are too reactive.
Replaced top box visualization with the new "table" feature available on trading view.
Added conditions for setting up alerts.
Minor variables renaming.
Disable informational labels for compatibility issues.
Dans le plus pur esprit de TradingView, l'auteur de ce texte l'a publié en open-source, afin que les traders puissent le comprendre et le vérifier. Bravo à l'auteur ! Vous pouvez l'utiliser gratuitement, mais la réutilisation de ce code dans une publication est régie par les règles internes. Vous pouvez le mettre en favori pour l'utiliser sur un graphique.
FYI MC script was not my source of inspiration for this script. In fact I was inspired by an much older script that was created on MT more than five years ago.
On the assets tested, the script had similar results on higher timeframes and lower timeframes.
Using the signal "O" instead of the color change on the candles gave much better results on backtesting as I expected :)