Bollinger Bands Custom Indicator

I’m looking a bollinger bands indicator that will let me choose input data of median price instead of the default close price!

This isn’t called a “Bollinger Band”, but you can construct it just by drawing an EMA of the median price and two standard deviations of it.

I’d prefer “typical price” (H+L+C/3) to “median price”.

What’s the problem with default sitting? I use default sitting on H4 time frame during range market only! On the other hand, I use moving average crossover trading strategy for the trendy market!

Bollinger Bands that comes with MT4 will let me Median Price but it will not let remove the middle line which I don’t need because I use a 26 ema instead and the Bands indicator that comes with MT4 will let me remove the middle line but it won’t let me use median price. I use ovo’s omnia bar for Renko with wicks and that’s why I would like to use median price, it draws a little smoother.

found this one, but it doesn’t paint, must be old code:

[CODE]
//±-----------------------------------------------------------------+
//| Better Bollinger bands.mq4 |
//| mladen |
//±-----------------------------------------------------------------+
#property copyright “mladen”
#property link "[email protected]"

#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 Green
#property indicator_color2 Green
#property indicator_color3 Gray

//
//
//
//
//

extern int BandsLength = 20;
extern double BandsDeviation = 2.0;
extern int AppliedPrice = PRICE_CLOSE;

//
//
//
//
//

double MaBuffer[];
double UpperBand[];
double LowerBand[];
double tBuffer[][4];

//±-----------------------------------------------------------------+
//| |
//±-----------------------------------------------------------------+
//
//
//
//
//

int init()
{
SetIndexBuffer(0,UpperBand);
SetIndexBuffer(1,LowerBand);
SetIndexBuffer(2,MaBuffer);
return(0);
}
int deinit()
{
return(0);
}

//±-----------------------------------------------------------------+
//| |
//±-----------------------------------------------------------------+
//
//
//
//
//

#define iMt1 0
#define iMt2 1
#define iUt1 2
#define iUt2 3

//
//
//
//
//

int start()
{
int counted_bars=IndicatorCounted();
int limit,i,r;

if(counted_bars < 0) return(-1);
if(counted_bars>0) counted_bars–;
limit = Bars-counted_bars;
if (ArrayRange(tBuffer,0) != Bars) ArrayResize(tBuffer,Bars);

//
//
//
//
//

double alpha = 2.0/(BandsLength+1.0);
for (i=limit, r=Bars-i-1; i>=0; i–,r++)
{
double price = iMA(NULL,0,1,0,MODE_SMA,AppliedPrice,i);

     //
     //
     //
     //
     //
     
        tBuffer[r][iMt1] = tBuffer[r-1][iMt1] + alpha*(price           -tBuffer[r-1][iMt1]);
        tBuffer[r][iUt1] = tBuffer[r-1][iUt1] + alpha*(tBuffer[r][iMt1]-tBuffer[r-1][iUt1]);
           double dt  = ((2-alpha)*tBuffer[r][iMt1]-tBuffer[r][iUt1])/(1-alpha);
        
        tBuffer[r][iMt2] = tBuffer[r-1][iMt2] + alpha*(MathAbs(price-dt)-tBuffer[r-1][iMt2]);
        tBuffer[r][iUt2] = tBuffer[r-1][iUt2] + alpha*(tBuffer[r][iMt2] -tBuffer[r-1][iUt2]);
           double dt2 = ((2-alpha)*tBuffer[r][iMt2]-tBuffer[r][iUt2])/(1-alpha);

     //
     //
     //
     //
     //
     
     MaBuffer[i]  = dt;
     UpperBand[i] = dt+BandsDeviation*dt2;
     LowerBand[i] = dt-BandsDeviation*dt2;
  }            

return(0);
}
[/CODE]

So, you are trying to make here a trading EA based of BB, isn’t?

The normal way around that, with trading software, is to use the same colour-setting as the background for the line you want to get rid of: that way it will still technically be there, but you won’t be able to see it, which is the desired result?