help with mql4

 
i want to make an indicator that measures the difference between up and down bol band can some one help me??
thanks in advance
 

In a standard Bollinger setup ( 20, 2 ) The difference is 2 standard deviations calculated over the last 20 periods.

 
phy:

In a standard Bollinger setup ( 20, 2 ) The difference is 2 standard deviations calculated over the last 20 periods.

i understand, the think i want is the deferent in prises
 

It is.

In a standard Bollinger setup ( 20, 2 ) The difference is 2 standard deviations of price calculated over the last 20 periods.

 
phy:

It is.

i mean prise for bb up 1.42 bb own 1.38 1.42-1.38=0.04 this prises in a line during the time
 

"i want to make an indicator that measures the difference between up and down bol band can some one help me??
thanks in advance"

Well, how do you want to do it?

Ok, use iCustom() on bollinger bands indicator, that might work

 
ikanis:
i want to make an indicator that measures the difference between up and down bol band can some one help me??
thanks in advance



here is a indecator that does just that :


#property copyright "The # one Lotfy"
#property link "hmmlotfy@hotmail.com"
//---- indicator settings
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Blue
extern int period=20;
extern int deviation=2;
double buffer[];

int init()
{
//---- drawing settings
SetIndexStyle(0,DRAW_LINE);
SetIndexDrawBegin(1,period);
SetIndexBuffer(0,buffer);
IndicatorShortName("diff");
return(0);
}
int start()
{
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; i<limit; i++)
buffer[i]=iBands(NULL,0,period,deviation,0,PRICE_LOW,MODE_UPPER,i)-
iBands(NULL,0,period,deviation,0,PRICE_LOW,MODE_LOWER,i);
return(0);
}

Files:
diff.mq4  2 kb
 
hmmlotfy:
ikanis:
i want to make an indicator that measures the difference between up and down bol band can some one help me??
thanks in advance



here is a indecator that does just that :


#property copyright "The # one Lotfy"
#property link "hmmlotfy@hotmail.com"
//---- indicator settings
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Blue
extern int period=20;
extern int deviation=2;
double buffer[];

int init()
{
//---- drawing settings
SetIndexStyle(0,DRAW_LINE);
SetIndexDrawBegin(1,period);
SetIndexBuffer(0,buffer);
IndicatorShortName("diff");
return(0);
}
int start()
{
int limit;
int counted_bars=IndicatorCounted();
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(int i=0; i<limit; i++)
buffer[i]=iBands(NULL,0,period,deviation,0,PRICE_LOW,MODE_UPPER,i)-
iBands(NULL,0,period,deviation,0,PRICE_LOW,MODE_LOWER,i);
return(0);
}


thank you very very much