
#property indicator_chart_window

int init()
  {
   return(0);
  }

int deinit()
  {
   return(0);
  }

int start()
  {
   int    counted_bars=IndicatorCounted();

double bullp = (iBullsPower(NULL, 0, 13,PRICE_CLOSE,0));
double bearp = (iBearsPower(NULL, 0, 13,PRICE_CLOSE,0));
double vol = iVolume(Symbol(),0,0);
double Buyers = (bullp * vol) / (bullp + bearp);
double Sellers = (bearp * vol) / (bullp + bearp);

string lbl[5], lbl2[5];
int n=124;
lbl[0] = "L1";
lbl2[0] = "Buyers: "+DoubleToStr(Buyers,0);
lbl[1] = "L2";
lbl2[1] = "Sellers: "+DoubleToStr(Sellers,0);
lbl[2] = "L3";
double pwr;
if (Buyers > Sellers) {pwr = Buyers / Sellers;}
if (Buyers < Sellers) {pwr = Sellers / Buyers;}
lbl2[2] = "Power: "+DoubleToStr(pwr,0);
lbl[3] = "L4";


for (int u=0;u<ArraySize(lbl);u++)
{
ObjectCreate(lbl[u],23,0,Time,PRICE_CLOSE);
ObjectSet(lbl[u],OBJPROP_XDISTANCE,16);
ObjectSet(lbl[u],OBJPROP_YDISTANCE,n);
ObjectSetText(lbl[u],lbl2[u],8,"Tahoma",DarkKhaki);
n = n+10;
}   
   return(0);
  }

