CandleBodyPrcnt





//+------------------------------------------------------------------+
//|                                              CandleBodyPrcnt.mq4 |
//|                 Copyright © 2008, Ronald Verwer / Forex MetaSoft |
//|                                     http://www.forexmetasoft.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2008, Ronald Verwer / Forex MetaSoft"
#property link      "http://www.forexmetasoft.com"

int i;
double prcnt,OverAllPercent;

//+------------------------------------------------------------------+
//| script initialization function                                   |
//+------------------------------------------------------------------+

int init()
   {
   Comment("");
   }

//+------------------------------------------------------------------+
//| script execution function                                        |
//+------------------------------------------------------------------+

int start()
   {
   for(i=Bars;i>=0;i--)
      {
      if(High[i]-Low[i]>0)
         prcnt+=((MathAbs(Open[i]-Close[i]))/(High[i]-Low[i]))*100;
      }
   OverAllPercent=prcnt/(Bars+1);

   Comment("\nAverage Candle Body of the "+Symbol()+" currency pair is "+DoubleToStr(OverAllPercent,2)+"%");

   //return(0);
   }

//+------------------------------------------------------------------+





Sample





Analysis



Market Information Used:

Series array that contains the highest prices of each bar
Series array that contains the lowest prices of each bar
Series array that contains close prices for each bar
Series array that contains open prices of each bar


Indicator Curves created:


Indicators Used:



Custom Indicators Used:

Order Management characteristics:

Other Features: