Author: Copyright � 2005, MetaQuotes Software Corp.
Bulls

This technical indicator is designed to provide traders with a visual representation of "buying pressure" or momentum by measuring the distance between the actual market price and a smoothed average of that price.

How the Logic Works

To understand what this tool does, it helps to break it down into three primary steps:

1. Establishing a Baseline (The Moving Average) First, the script calculates an Exponential Moving Average (EMA). Think of this as the "smoothed" path of the market. Instead of looking at every tiny price fluctuation, it looks at a specific window of time (defined by the user as 13 periods by default) to determine the general trend of where the price is heading.

2. Measuring the Gap The core logic of this indicator lies in comparing the "High" price of the current market candle against that smoothed average. Essentially, it asks: "How much higher did the price reach compared to its recent average?"

By subtracting the average value from the highest price point, the script identifies the "excess" movement. A larger gap suggests stronger upward momentum, while a smaller or decreasing gap indicates that the buying pressure is cooling off.

3. Visual Representation The result of this calculation is displayed as a histogram in a separate window below your main price chart. This allows you to see the strength of the "Bulls" (the buyers) independently of the price action:

  • When the histogram bars are tall, it indicates significant strength or a "stretch" away from the average.
  • When the bars are short, it shows that the price is trading very close to its recent average, suggesting less aggressive buying activity.

Summary for Traders

This tool acts as a momentum gauge. It filters out the "noise" of standard price movements to highlight how aggressively the market is pushing upward relative to its recent history. By observing these fluctuations, traders can better visualize the intensity of market trends.

Indicators Used
Moving average indicator
Miscellaneous
Implements a curve of type %1
12 Views
0 Downloads
0 Favorites
Bulls
//+------------------------------------------------------------------+
//|                                                        Bulls.mq4 |
//|                      Copyright © 2005, MetaQuotes Software Corp. |
//|                                       http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net/"

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Silver
//---- input parameters
extern int BullsPeriod=13;
//---- buffers
double BullsBuffer[];
double TempBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   string short_name;
//---- 1 additional buffer used for counting.
   IndicatorBuffers(2);
   IndicatorDigits(Digits);
//---- indicator line
   SetIndexStyle(0,DRAW_HISTOGRAM);
   SetIndexBuffer(0,BullsBuffer);
   SetIndexBuffer(1,TempBuffer);
//---- name for DataWindow and indicator subwindow label
   short_name="Bulls("+BullsPeriod+")";
   IndicatorShortName(short_name);
   SetIndexLabel(0,short_name);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Bulls Power                                                      |
//+------------------------------------------------------------------+
int start()
  {
   int i,counted_bars=IndicatorCounted();
//----
   if(Bars<=BullsPeriod) return(0);
//----
   int limit=Bars-counted_bars;
   if(counted_bars>0) limit++;
   for(i=0; i<limit; i++)
      TempBuffer[i]=iMA(NULL,0,BullsPeriod,0,MODE_EMA,PRICE_CLOSE,i);
//----
   i=Bars-counted_bars-1;
   while(i>=0)
     {
      BullsBuffer[i]=High[i]-TempBuffer[i];
      i--;
     }
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments