Download MetaTrader 5

Indicators: Indicator BoDi.

To add comments, please log in or register
Publish your article and win recognition from thousands of traders!
MetaQuotes Software Corp.
Moderator
181422
MetaQuotes Software Corp. 2012.08.17 09:20 

Indicator BoDi.:

Indicator BoDi for finding signals to close position.

Author: Paladin80

sycamor
7
sycamor 2012.08.17 21:29  

Hi,

look's good, I test this indi next week

Regards,

Sycamor

Paladin80
703
Paladin80 2012.08.20 06:50  

For those who wants to use algorithm of this indicator in expert adviser, below the appropriate custom function.

//--------------------------------------------- iBoDifunc() - start
//+----------------------------------------------------------------------------+
//| Input parameters:                                                          |
//|   Sy - Symbol.                                                             |
//|   Tf - Timeframe.                                                          |
//|   BoDi_per - Averaging period.                                             |
//|   BoDi_shift - The indicator shift relative to the chart.                  |
//|   Applied_price - Applied price.                                           |
//|   BoDi_MA_mode - Applied MA method.                                        |
//|   Shift - Index of the value taken from the indicator buffer.              |
//+----------------------------------------------------------------------------+
//|   Formula to calculate BoDi:                                               |
//}   BoDi = (UpperLine - LowerLine)*1000                                      |
//|    where: UpperLine - upper line of Bollinger Bands                        |
//|           LowerLine - lower line of Bollinger Bands                        |
//|           1000 - coefficient for better visualization                      |
//+----------------------------------------------------------------------------+
double iBoDifunc(string Sy,int Tf,int BoDi_per,int BoDi_shift,int Applied_price,int BoDi_MA_mode,int Shift)
{  
double ML, sum=0.0, a;
if (Sy=="" || Sy=="0") Sy=Symbol();
  
ML=iMA(Sy,Tf,BoDi_per,BoDi_shift,BoDi_MA_mode,Applied_price,Shift);
for (int i=Shift; i<=BoDi_per-1+Shift; i++)
{  switch(Applied_price)   
{  case PRICE_CLOSE:    a=iClose(Sy,Tf,i+BoDi_shift)-ML; break;
   case PRICE_OPEN:     a=iOpen (Sy,Tf,i+BoDi_shift)-ML; break;
   case PRICE_HIGH:     a=iHigh (Sy,Tf,i+BoDi_shift)-ML; break;
   case PRICE_LOW:      a=iLow  (Sy,Tf,i+BoDi_shift)-ML; break;
   case PRICE_MEDIAN:   a=(iHigh(Sy,Tf,i+BoDi_shift)+iLow(Sy,Tf,i+BoDi_shift))/2.0-ML; break;
   case PRICE_TYPICAL:  a=(iHigh(Sy,Tf,i+BoDi_shift)+iLow(Sy,Tf,i+BoDi_shift)+iClose(Sy,Tf,i+BoDi_shift))/3.0-ML; break;
   case PRICE_WEIGHTED: a=(iHigh(Sy,Tf,i+BoDi_shift)+iLow(Sy,Tf,i+BoDi_shift)+2*iClose(Sy,Tf,i+BoDi_shift))/4.0-ML; break;
   default: a=0.0;
}
sum+=a*a;
}
double semi_res=MathSqrt(sum/BoDi_per);
double upper=ML+semi_res;
double lower=ML-semi_res;
double diff=(upper-lower)*1000;
return (diff);
}
//--------------------------------------------- iBoDifunc() - end
MQL4 Comments
16319
MQL4 Comments 2012.10.31 20:41  

Hi Paladin,


BoDi ist not a name for an Indicator to get famous.

Maybe u should name it

The Paladin System


But first just rethink what u calculate:

UpperBand=  MA+SD(StandardDeviation)

LowerBand= MA- SD


BoDi=  UpperBand-LowerBand = ((MA + SD)-(MA-SD))*1000= (Ma+SD-Ma+SD)*1000= (MA-MA+SD+SD)*1000=2*SD*1000

So u just calculate the StandardDeviation*2*1000 This is not new.Sorry.

Paladin80
703
Paladin80 2012.11.05 12:50  
TraderFFM1978:

Hi Paladin,


BoDi ist not a name for an Indicator to get famous.

Maybe u should name it

The Paladin System


But first just rethink what u calculate:

UpperBand=  MA+SD(StandardDeviation)

LowerBand= MA- SD


BoDi=  UpperBand-LowerBand = ((MA + SD)-(MA-SD))*1000= (Ma+SD-Ma+SD)*1000= (MA-MA+SD+SD)*1000=2*SD*1000

So u just calculate the StandardDeviation*2*1000 This is not new.Sorry.

You know I could agree with you. Before to publish it I felt that it will not be extraordinary indicator. I just wanted to show another way trying to find moment to close position. I was not familiarize well with Standart deviation indicator, but now I see that I just did the same as StdDev calculates. What is new is a visualization as histogram and tips for finding closing moment. Such interpretation may be applied to StdDev indicator.
To add comments, please log in or register