Home
    Product
    Support
    Purchase
    Company

Advanced trading software: technical analysis and neural networks

Empowering wise traders

Support Center
Publications
Tradecision FAQs
Improvian Consulting
Contact Support Team
Knowledgebase
Collection of Indicators
Custom Indicators
Custom Studies
TASC Traders' Tips
Active Trader Strategies
Golden Trading Rules
Traderís Quiz

Traders' Tips from TASC Magazine
Smoothing The Bollinger %b

In his article ďSmoothing The Bollinger %bĒ, Sylvain Vervoot has investigated the variation of the Bollinger bands indicator to find clear turning points that will help traders identify entry and exit points.

Using Tradecisionís Function Builder, one needs to create the TEMA function:

TEMA function:

function (Price:Numeric = 
C, Length:Numeric = 9): Numeric;
return (3*EMA(Price,Length) - 
3*EMA(EMA(Price,Length),Length)) + 
EMA(EMA(EMA(Price,Length),Length),Length);

Using Tradecisionís Indicator Builder, one needs to create the SMOOTHED BOLLINGER % B, SMOOTHED BOLLINGER % B TOP and SMOOTHED BOLLINGER % B BOTTOM indicators:

SMOOTHED BOLLINGER %B indicator:

input
period:"%b period:",18,1,100;
TeAv:"Tema average:",8,1,30;
afwh:"Standard deviation high",1.6,0.1,5;
afwl:"Standard deviation low",1.6,0.1,5;
afwper:"Standard deviation period",63,1,200;
end_input

var
denom:=0;
WeightPrice:=0;
haOpen:=0;
haC:=0;
TMA1:= 0;
TMA2:= 0;
Diff:= 0;
ZlHA:= 0;
percb:=0;
end_var

if HISTORYSIZE < 2 then return 0;
WeightPrice:=(O\1\ + H\1\ + L\1\ + C\1\) / 4;
haOpen:=(WeightPrice + WeightPrice\1\) / 2;
haC:=((O + H + L + C) / 4 + 
haOpen + Max(H, haOpen) + 
Min(L, haOpen)) / 4;


TMA1:= TEMA(haC,TeAv) ;
TMA2:= TEMA(TMA1,TeAv);
Diff:=TMA1 - TMA2;
ZlHA:=TMA1 + Diff;

denom:= 4 * StdDev(TEMA(ZLHA, TeAv), period);
        if denom = 0 then return inf;

percb:=(TEMA(ZLHA, TeAv) + 
2 * StdDev(TEMA(ZLHA, TeAv), period) - 
WMA(TEMA(ZLHA, TeAv), period)) / denom * 100;
   return percb;

SMOOTHED BOLLINGER %B TOP indicator:

input
period:"%b period:",18,1,100;
TeAv:"Tema average:",8,1,30;
afwh:"Standard deviation high",1.6,0.1,5;
afwl:"Standard deviation low",1.6,0.1,5;
afwper:"Standard deviation period",63,1,200;
end_input

var
denom:=0;
WeightPrice:=0;
haOpen:=0;
haC:=0;
TMA1:= 0;
TMA2:= 0;
Diff:= 0;
ZlHA:= 0;
percb:=0;
end_var

if HISTORYSIZE < 2 then return 0;
WeightPrice:=(O\1\ + H\1\ + L\1\ + C\1\) / 4;
haOpen:=(WeightPrice + WeightPrice\1\) / 2;
haC:=((O + H + L + C) / 4 + 
haOpen + Max(H, haOpen) + 
Min(L, haOpen)) / 4;


TMA1:= TEMA(haC,TeAv) ;
TMA2:= TEMA(TMA1,TeAv);
Diff:=TMA1 - TMA2;
ZlHA:=TMA1 + Diff;

denom:= 4 * StdDev(TEMA(ZLHA, TeAv), period);
        if denom = 0 then return inf;

percb:=(TEMA(ZLHA, TeAv) + 
2 * StdDev(TEMA(ZLHA, TeAv), period) - 
WMA(TEMA(ZLHA, TeAv), period)) / denom * 100;
        return 50 + afwh * StdDev(percb, afwper);

SMOOTHED BOLLINGER %B BOTTOM indicator:

input
period:"%b period:",18,1,100;
TeAv:"Tema average:",8,1,30;
afwh:"Standard deviation high",1.6,0.1,5;
afwl:"Standard deviation low",1.6,0.1,5;
afwper:"Standard deviation period",63,1,200;
end_input

var
denom:=0;
WeightPrice:=0;
haOpen:=0;
haC:=0;
TMA1:= 0;
TMA2:= 0;
Diff:= 0;
ZlHA:= 0;
percb:=0;
end_var

if HISTORYSIZE < 2 then return 0;
WeightPrice:=(O\1\ + H\1\ + L\1\ + C\1\) / 4;
haOpen:=(WeightPrice + WeightPrice\1\) / 2;
haC:=((O + H + L + C) / 4 + 
haOpen + Max(H, haOpen) + 
Min(L, haOpen)) / 4;


TMA1:= TEMA(haC,TeAv) ;
TMA2:= TEMA(TMA1,TeAv);
Diff:=TMA1 - TMA2;
ZlHA:=TMA1 + Diff;

denom:= 4 * StdDev(TEMA(ZLHA, TeAv), period);
        if denom = 0 then return inf;

percb:=(TEMA(ZLHA, TeAv) + 
2 * StdDev(TEMA(ZLHA, TeAv), period) - 
WMA(TEMA(ZLHA, TeAv), period)) / denom * 100;
     return 50 - afwh * StdDev(percb, afwper);



Download to import into Tradecision.

How to use this indicator in Tradecision:
  1. Click Download.
  2. Save this indicator in a safe location on your hard drive.
  3. Open Tradecision and in the Tools menu click Indicator Builder.
  4. In the Indicator Builder dialog, click Import, locate the saved file and then click OK.
The indicator will be added to the Custom Indicators list.
 
Smoothing The Bollinger %b
Tradecision Reviews
Video Tours
Ask a question

Site Map   |   Terms of Use   |   Privacy Policy   |   Risk Warning
Forex, equities or futures trading involves substantial risk of loss and is not suitable for all investors.
Copyright © 2001-2017 Alyuda Research, LLC.  All rights reserved