sH_Bears_n_Bulls_V_free
Download scriptThis tool is designed to provide a visual representation of market momentum by breaking down price action into the relative strengths of "Bullish" (buying) and "Bearish" (selling) forces. Unlike standard volume indicators that simply show how much trading occurred, this script analyzes the relationship between price movement, price range, and volume to give you a clearer picture of who is currently controlling the market.
How it Works
The logic behind the indicator relies on categorizing every price candle into either a winning move for the buyers or a winning move for the sellers. It then calculates the "intensity" of that move by looking at how much of the total price range was covered relative to the trading volume.
1. Identifying Market Direction The tool first determines the direction of each individual candle.
- If the closing price is higher than the opening price, it identifies a Bullish move.
- If the closing price is lower than the opening price, it identifies a Bearish move.
2. Calculating Strength (The Logic) Once the direction is established, the tool calculates specific values for both the Bulls and the Bears:
- For Bullish Candles: The tool measures the distance from the opening price to the high point to see how much "upward" progress was made. It then performs a similar calculation for the downward portion of that same candle to determine the Bears' counter-pressure.
- For Bearish Candles: The tool measures the distance from the opening price down to the low point to see the strength of the selling pressure. It then calculates the upward movement within that same period to see the remaining "buying" activity.
3. Normalizing by Volume To make this data useful, the script divides these distance calculations by the total volume traded during that specific candle. This "normalizes" the data, allowing you to see the quality of the move rather than just the size. By dividing by volume, the indicator highlights whether a price move was supported by significant trading activity or if it was a weak move on low participation.
Visual Representation
The results are displayed in a separate window as a dual histogram:
- Bulls: Represented in Dodger Blue, showing the intensity of buying pressure.
- Bears: Represented in Dark Orange, showing the intensity of selling pressure.
By observing these two histograms side-by-side, traders can visually identify which side is dominating the current trend and how much conviction is behind the price action at any given moment.
//+------------------------------------------------------------------+
//| This has been coded by MT-Coder |
//| |
//| Email: mt-coder@hotmail.com |
//| Website: mt-coder.110mb.com |
//| |
//| For a price I can code for you any strategy you have in mind |
//| into EA, I can code any indicator you have in mind |
//| |
//| Don't hesitate to contact me at mt-coder@hotmail.com |
//+------------------------------------------------------------------+
//+------------------------------------------------------------------+
//| This indicator shows both powers of the Bull and Bear |
//| the market volume excluded |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, MT-Coder."
#property link "http://mt-coder.110mb.com/"
#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 DodgerBlue
#property indicator_color2 DarkOrange
//---- input parameters
int sHPeriod=100;
//---- buffers
double BullsBuffer[];
double BearsBuffer[];
//+------------------------------------------------------------------+
//| 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);
SetIndexStyle(1,DRAW_HISTOGRAM);
SetIndexBuffer(1,BearsBuffer);
//---- name for DataWindow and indicator subwindow label
short_name="Bears n Bulls V free - by MT-Coder@hotmail.com" ;
IndicatorShortName(short_name);
SetIndexLabel(0,"Bulls");
SetIndexLabel(1,"Bears");
//----
SetIndexDrawBegin(0,sHPeriod);
//----
return(0);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{
int i,counted_bars=IndicatorCounted();
//----
if(Bars<=sHPeriod) return(0);
//---- initial zero
if(counted_bars<1)
for(i=1;i<=sHPeriod;i++) BullsBuffer[Bars-i]=0.0;
//----
//----
//----
i=Bars-sHPeriod-1;
if(counted_bars>=sHPeriod) i=Bars-counted_bars-1;
while(i>=1)
{
if(Close[i]>Open[i])
{
BullsBuffer[i] = (High[i]-Open[i])/Volume[i];
BearsBuffer[i] = (Close[i] - High[i] + Low[i] - Open[i])/Volume[i];
}
if(Close[i]<Open[i])
{
BullsBuffer[i] = (High[i]-Open[i] + Close[i] - Low[i])/Volume[i];
BearsBuffer[i] = (Low[i] - Open[i])/Volume[i];
}
i--;
}
return(0);
}
//+------------------------------------------------------------------+
Comments