Bear_Bulls_Power

Author: Waddah Attar
Bear_Bulls_Power

This script serves as a visual momentum indicator designed to help traders identify the prevailing strength between "Bulls" (buyers) and "Bears" (sellers) in the market. By analyzing how price action interacts with a moving average, it provides a clear representation of which side currently holds the upper hand.

Core Logic and Mechanics

The tool operates based on three primary steps:

1. Establishing a Baseline The script first calculates an Exponential Moving Average (EMA). Think of this as a "smooth" line that represents the recent average price of the asset over a specific timeframe (which can be customized by the user). This acts as the equilibrium point or the "fair value" for the current market trend.

2. Measuring Market Pressure Once the baseline is established, the script measures the distance between the current price candles and that average:

  • Bullish Pressure: It calculates how far the high of a candle reaches above the moving average.
  • Bearish Pressure: It calculates how far the low of a candle reaches below the moving average.

By combining these two measurements, the script determines the average "stretch" or "tension" of the price relative to its mean.

3. Visualizing the Sentiment The final result is displayed as a dual-colored histogram in a separate window below your main chart:

  • Green Bars: When the calculated tension is positive (meaning the price action is predominantly favoring the upward momentum), the script displays green bars. The taller the bar, the stronger the bullish pressure.
  • Red Bars: When the tension is negative (indicating that the price action is pulling downward more aggressively), the script displays red bars. The deeper the bar, the stronger the bearish pressure.

How to Interpret the Results

Rather than just showing you where the price is, this tool visualizes the intensity of the movement. It helps traders see when a trend is gaining significant strength or when the market is shifting its dominance from one side to the other. When the bars shift from green to red (or vice versa), it signals a change in who is controlling the market's direction.

Indicators Used
Moving average indicator
Miscellaneous
Implements a curve of type %1
14 Views
0 Downloads
0 Favorites
Bear_Bulls_Power
//+------------------------------------------------------------------+
//|                                             Bear_Bulls_Power.mq4 |
//|                              Copyright © 2006, Eng. Waddah Attar |
//|                                          waddahattar@hotmail.com |
//+------------------------------------------------------------------+
#property copyright "Waddah Attar"
#property link      "waddahattar@hotmail.com"
//----
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Green
#property indicator_color2 Red
#property indicator_level1 0.0
//----
extern int MyPeriod = 13;
//----
double ExtBuffer1[];
double ExtBuffer2[];
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int init()
  {
   SetIndexBuffer(0, ExtBuffer1);
   SetIndexStyle(0,DRAW_HISTOGRAM,0,2);
//----
   SetIndexBuffer(1, ExtBuffer2);
   SetIndexStyle(1,DRAW_HISTOGRAM,0,2);
//----   
   IndicatorShortName("Bear_Bulls_Power (" + MyPeriod + ") ");
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start()
  {
   double ma, pBears ,pBulls ,v;
   int i, limit;
   int counted_bars = IndicatorCounted();
   if(counted_bars < 0) 
       return(-1);
   if(counted_bars > 0) 
       counted_bars--;
   limit = Bars - counted_bars; 
   for(i = 0; i < limit; i++)
     {
       ma = iMA(NULL, 0, MyPeriod, 0, MODE_EMA, PRICE_CLOSE, i);
       pBulls = High[i] - ma;
       pBears = Low[i] - ma;
       v = (pBears + pBulls) / 2;
       if(v >= 0)
         {
           ExtBuffer1[i] = v;
           ExtBuffer2[i] = 0;
         }
       else
         {
           ExtBuffer1[i] = 0;
           ExtBuffer2[i] = v;
         }
     }
   return(0);
  }
//+------------------------------------------------------------------+

Comments