Bollinger Bands - Percentage and Bandwidth

Here you can post and download custom indicators. PLEASE: Do not start topics unless you are posting your own indicator, they will be moved to appropriate section even if you do.

Moderator: admin

Bollinger Bands - Percentage and Bandwidth

Postby TonyMod » Wed Jan 06, 2010 12:55 pm

Hello,

These are 2 additions to Bollinger Bands indicator:

1. Bollinger Bands - Percentage (Line)
Formula: b% = ((close - lower band) / (upper band - lower band)) * 100

NOTE There is NEW version or %B indicator.
BB-Percentages.lua
Download: Bollinger Band - Percentages in .Lua
(2.35 KiB) Downloaded 2728 times



2. Bollinger Bands - Bandwidth (Histogram/Bar)
Formula: Bandwidth = ((upper band - lower band) / middle band)
BB-Bandwidth.lua
Download: Bollinger Band - Bandwidth in .Lua
(2.3 KiB) Downloaded 3119 times


These two and original Bollinger Bands from MarketScope, can be ran together for best effect.

Here is a screenshot of % and bandwidth running:
BB-percentage-AND-bandwidth-oscillator.gif
Bollinger Bands: Percentage and Bandwidth, two indicators at the same time in MarketScope.


Buy/Sell signals (provided by fxcodebase.com user):
Buy Signal - Bollinger Percent = 0 (<0.1)
Sell Signal - Bollinger Percent = 1 (>0.9)

Detailed Description of Bollinger Bands can be found here at their official website:
http://www.bollingerbands.com/services/bb/
Best Regards,

"TonyMod"
(FXCodeBase.com Forum Moderator)
TonyMod
FXCodeBase: Site Admin
 
Posts: 70
Joined: Wed Oct 21, 2009 1:57 pm
Location: New Jersey

Re: Bollinger Bands - Percentage and Bandwidth

Postby Apprentice » Wed Jan 06, 2010 1:20 pm

Thanks for the effort, as far as I can see, Bollinger Percentages (% B) corresponds to the specification, I gave.
I have two suggestions, would be helpful to add line a line at 0.5 and 1 (50 and 100 percent).
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Bollinger Bands - Percentage and Bandwidth

Postby TonyMod » Wed Jan 06, 2010 1:30 pm

Apprentice wrote:Thanks for the effort, as far as I can see, Bollinger Percentages (% B) corresponds to the specification, I gave.
I have two suggestions, would be helpful to add line a line at 0.5 and 1 (50 and 100 percent).


Good, i'm really glad our work is useful to people. Let me know if anything needs to be fixed or changed, tweaked, etc....

As far as adding lines, yes its possible to do using an indicator, but doesn't MarketScope allow adding of any type of lines user desires right on top of the chart?
Best Regards,

"TonyMod"
(FXCodeBase.com Forum Moderator)
TonyMod
FXCodeBase: Site Admin
 
Posts: 70
Joined: Wed Oct 21, 2009 1:57 pm
Location: New Jersey

Re: Bollinger Bands - Percentage and Bandwidth

Postby Apprentice » Wed Jan 06, 2010 2:26 pm

you're right, I'm a little lazy
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Bollinger Bands - Percentage and Bandwidth

Postby skipper » Wed Nov 17, 2010 9:34 pm

There is a little extension of BBW oscillator

Bollinger Bandswidth oscillator would help to measure price plot’s volatility; it shows result as a width of Bollinger Bands in times, points or price %. Technically speaking Bollinger Bandswidth is a standard deviation of price movement multiplied by [some] number of deviations.

When the BBW is close to 0 it shows low volatility and when it moves to its high levels volatility is high. You have to understand that width of Bollinger Bands is VERY depend on time frame; so you have to setup range levels of the oscillator every time when you change the time frame. Default levels (0.28-1.4) are good for BB(5min,75,2) only.

As a rule, volatility moves in cycles - periods of low volatility are replaced by periods of high volatility. In general, periods of high volatility can be noted during down-trends and corrections downward. Periods of low volatility can be observed during up-trends and recoveries.

Also this nutty oscillator could help to filter out a noise of insufficient signals producing by some indicators (like Volty Channel Stop) in low volatile market.

Attached 2 versions of Oscillator: single time frame and bigger time frame.
Attachments
bb_width.lua
current timeframe
(4.27 KiB) Downloaded 1797 times
BF_BB_Width.lua
bigger timeframe
(9.32 KiB) Downloaded 1669 times
Untitled.png
how it looks like
skipper
FXCodeBase: Confirmed User
 
Posts: 2
Joined: Tue Nov 16, 2010 5:33 pm

Re: Bollinger Bands - Percentage and Bandwidth

Postby nookie » Fri May 27, 2011 5:15 am

Hello,

I would like to ask is it possible to change/tweak this indicator a bit with showing it like a histogram or otherwise tell me how to add lines to this indicator itself so I can later remove/add this indicator with the lines I setup before ... if this is possible?

Thanks
nookie
FXCodeBase: Graduate
 
Posts: 203
Joined: Tue May 24, 2011 12:50 pm

Re: Bollinger Bands - Percentage and Bandwidth

Postby Apprentice » Fri May 27, 2011 9:23 am

Like This.
BB-Percentages.lua
(2.79 KiB) Downloaded 1772 times


Simply replacing core.Line with core.Bar.
When you define indicator output stream.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Bollinger Bands - Percentage and Bandwidth

Postby nookie » Tue Jun 07, 2011 5:13 am

Sorry again for bothering but how is it possible to add lines to this indicator and with different colours.. for example lines on levels 100 and 0 ?

Thanks a lot

nookie
nookie
FXCodeBase: Graduate
 
Posts: 203
Joined: Tue May 24, 2011 12:50 pm


Re: Bollinger Bands - Percentage and Bandwidth

Postby Apprentice » Fri Jun 24, 2011 1:16 pm

Style Option Added to Bollinger Band - Percentage Oscillator
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Next

Return to Custom Indicators

Who is online

Users browsing this forum: Majestic-12 [Bot] and 52 guests