BullsBearsEyes

Download script
Author: Copyright � 2005
BullsBearsEyes

This indicator is designed to provide a visual representation of market sentiment by calculating the balance between "Bullish" and "Bearish" momentum. Rather than looking at price movements in isolation, it analyzes the underlying power dynamics of the market to help traders identify whether buyers or sellers are currently in control.

Core Logic and Methodology

The script operates through a multi-layered mathematical process to smooth out market noise and provide a clearer picture of trend strength:

1. Sentiment Power Calculation The foundation of the indicator lies in calculating two distinct forces: Bullish Power and Bearish Power. By looking at specific price actions over a defined period, the tool determines how aggressively the market is moving in either direction.

2. Weighted Averaging (Smoothing) To prevent the data from being too erratic or "jumpy," the script uses a smoothing technique (referred to as Gamma). This allows the indicator to prioritize recent price action while still maintaining the context of previous movements. It creates a fluid transition between data points, ensuring that small, insignificant price flickers do not create false signals.

3. Multi-Layered Progression The logic processes the market data through four distinct layers (L0 through L3). Each layer builds upon the previous one using a reciprocal relationship. This "chaining" effect helps to filter out temporary volatility, effectively distilling the raw market power into a more refined and stable trend line.

4. The Relative Sentiment Index (LRSI) The final output of the script is a normalized value represented in the indicator window. By comparing the cumulative bullish gains against the cumulative bearish losses across all processed layers, the script calculates a ratio.

How to Interpret the Results

The indicator provides a value that generally fluctuates between 0 and 1 (or higher/lower depending on the market's extremes):

  • Bullish Dominance: When the value leans toward the upper side of the scale, it indicates that bullish momentum is currently outweighing bearish pressure.
  • Bearish Dominance: When the value leans toward the lower side of the scale, it suggests that bearish forces are prevailing.
  • Neutrality/Balance: When the value sits in the middle, it signifies a period of equilibrium where neither side has established clear control over the market.

By using this tool, traders can better visualize the " tug-of-war" between buyers and sellers, allowing for a more informed perspective on current market momentum.

Indicators Used
Bulls Power indicator Bears Power indicator
14 Views
0 Downloads
0 Favorites
BullsBearsEyes
/*-----------------------------+
|			       |
| Shared by www.Aptrafx.com    |
|			       |
+------------------------------*/

//+-------------------------------------------------------------------------+
//| BullsBearsEyes.mq4                                                      |
//| EmeraldKing , transport_david                                           |
//| http://finance.groups.yahoo.com/group/MetaTrader_Experts_and_Indicators/|
//+-------------------------------------------------------------------------+
#property copyright "Copyright © 2005"
#property link      "http://finance.groups.yahoo.com/group/MetaTrader_Experts_and_Indicators/"

#property indicator_separate_window
#property indicator_minimum -0.05
#property indicator_maximum 1.05
#property indicator_color1 Orange
#property indicator_level2 1.0
#property indicator_level3 0.75
#property indicator_level4 0.50
#property indicator_level5 0.25
#property indicator_level6 0.0
//---- input parameters
extern double periods=13;
extern double timeperiods=0;
extern double gamma=0.6;
extern int CountBars=300;

double L0 = 0;
double L1 = 0;
double L2 = 0;
double L3 = 0;
double L0A = 0;
double L1A = 0;
double L2A = 0;
double L3A = 0;
double LRSI = 0;
double CU = 0;
double CD = 0;

double val1[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
//----
   SetIndexBuffer(0,val1);
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- TODO: add your code here
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   if (CountBars>Bars) CountBars=Bars;
   SetIndexDrawBegin(0,Bars-CountBars);
   
   int i;
   int    counted_bars=IndicatorCounted();

   i=CountBars-1;
   while(i>=0)
   {
      L0A = L0;
      L1A = L1;
      L2A = L2;
      L3A = L3;
      L0 = ((1 - gamma)*(iBullsPower(NULL, timeperiods, periods,PRICE_CLOSE,i)
                       +iBearsPower(NULL, timeperiods, periods,PRICE_CLOSE,i))) + (gamma*L0A);
      L1 = - gamma *L0 + L0A + gamma *L1A;
      L2 = - gamma *L1 + L1A + gamma *L2A;
      L3 = - gamma *L2 + L2A + gamma *L3A;

      CU = 0;
      CD = 0;
      
      if (L0 >= L1) CU = L0 - L1; else CD = L1 - L0;
      if (L1 >= L2) CU = CU + L1 - L2; else CD = CD + L2 - L1;
      if (L2 >= L3) CU = CU + L2 - L3; else CD = CD + L3 - L2;

      if (CU + CD != 0) LRSI = CU / (CU + CD);
      val1[i] = LRSI;
	  i--;
	}
   return(0);
 }
//+------------------------------------------------------------------+

Comments