In a standard Bollinger setup ( 20, 2 ) The difference is 2 standard deviations calculated over the last 20 periods.
In a standard Bollinger setup ( 20, 2 ) The difference is 2 standard deviations calculated over the last 20 periods.
It is.
In a standard Bollinger setup ( 20, 2 ) The difference is 2 standard deviations of price calculated over the last 20 periods.
It is.
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);
}
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);
}
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
thanks in advance