Indicators: Welch Bollinger Band ® Width

Moderator
186050

This uses the standard Bollinger Band calculations to further calculate the width of the Upper and Lower Bands, comparing that number to the Max and Min width of the bands for the last N periods. The results are plotted onto a histogram.

Author: maj1es2tic

6270

For what it's worth, the best settings that I have found for use on AUDUSD for the 30m chart is: MinRangePercent=25, WidthCalcPeriod=60, (everything else default)

You can also set your colors differently. I thought about it later that swapping the Red/Green colors would be good. That would make the ranging/squeezing period RED, since that is when you DONT want to trade.

495

maj1es2tic:

For what it's worth, the best settings that I have found for use on AUDUSD for the 30m chart is: MinRangePercent=25, WidthCalcPeriod=60, (everything else default)

You can also set your colors differently. I thought about it later that swapping the Red/Green colors would be good. That would make the ranging/squeezing period RED, since that is when you DONT want to trade.

Could you make this into a multi time frame indicator
16319

great idea thanks for sharing
116

It's worderful, I appreciate you. :)

317

Hello,

I like this indicator, thanks however I cannot run it over EA. I complied the indicator and put it in the folder "/experts/indicators". The settings are both same in EA and indicator but the function AreWeRanging(1) always returns 1 in EA. I tried to understand if it returns an error but I couldn't manage it by GetLastError() function.

Can someone comment how to make it run on EA or how can I trace that the iCustom() returns the correct values???

int areWeRanging(int period=0)
{
int e=0;
double WelchBBWidth_Green = iCustom(NULL, 0, "WelchBBWidth", 20, 0, 2.0, 20, "x", 100, "x", false, 0, period);
double WelchBBWidth_Yellow = iCustom(NULL, 0, "WelchBBWidth", 20, 0, 2.0, 20, "x", 100, "x", false, 1, period);
e=GetLastError();
if(e!=0) {
Alert("iCustom Error ---- > ",ErrorDescription(e),"  Err code=",e);
return;
}
if ( WelchBBWidth_Green > 0 )
{
return (1);
}
else if ( WelchBBWidth_Yellow > 0)
{
return (-1);
}
return (0);
}
267

maj1es2tic:

For what it's worth, the best settings that I have found for use on AUDUSD for the 30m chart is: MinRangePercent=25, WidthCalcPeriod=60, (everything else default)

You can also set your colors differently. I thought about it later that swapping the Red/Green colors would be good. That would make the ranging/squeezing period RED, since that is when you DONT want to trade.

6

it's perfert indicated,

but I'have a question to apply to EA

why the fucntion areWeRanging() always reply (1)?

i miss something ?

437

good indicator indeed!