Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

Bolling band normalization for Amibroker (AFL)

Rating:
3 / 5 (Votes 4)
Tags:
trading system, amibroker, bands

Bollinger Band Normalization…It provides good results.

Indicator / Formula

Copy & Paste Friendly
//In "Bollinger on Bollinger Bands", John Bollinger described a method of normalizing indicators on any stock regardless of volatility. The method simply computes the percentage position within Bollinger bands. Touching the lower band is zero, while touching the upper band is 100%.
//In the graph, indicator Lines are drawn at the 0, 50, AND 100% positions. Bollinger bands are shown in white, the indicator is shown in red, and the relative range position is shown in yellow. The multipliers are used to display all items in a single window.
//Graph0 depicts the indicator of current interest. Simply uncomment to view a different indicator.
MaxGraph=8;
Graph0=100000*(C+O+H+L)/Sum(C,20); //Bollinger believes all 4 items are better
//Graph0=50000*(BBandTop(C,40,2)-BBandBot(C,40,2))*C/BBandTop(C,40,2); //Volatility change - Reversal indicator?

//Graph0=100*MFI(14); //MoneyFlowIndex - G. Quong & A. Soudek
//Graph0=100*RSI(14);
//Graph0=1000*MACD(12,26);
//Graph0=1000*Signal(12,26,9);
//Graph0=1000*V*Signal(12,26,9)/(Sum(V,12)/12); //VolWeighted MACD - B. Dormeier
//Graph0=100*ROC(EMA(C,7),21); //Smoothed RateOfChange - 
//Graph0=-500*ADX(14); 
//Graph0=.0001*AccDist(); //Acc-distribution - Larry Williams
//Graph0=10000*EMA((2*C-H-L)*Sum(V,12)/((H-L)*V*12),10); //Intraday intensity - David Bostian
//Graph0=100*(C-Ref(C,-1)*V*12)/Sum(V,12); //Force index - Dr. Elder

//Compute the Bollinger bands (40 bars & 2.0 SD).
Graph1=BBandTop(Graph0,40,2);
Graph2=BBandBot(Graph0,40,2);

//Compute the relative position within the bands.
Graph3=10000*(Graph0-Graph2)/(Graph1-Graph2);
//A Zig-Zag line is used to better view the trend changes. Smaller ZigChange values mean busier charts and more frequent trading. Other parameters also should be optimized for best results.
ZigChange=Optimize("Zig",50,40,100,10);
Graph4=Zig(Graph3+1000,ZigChange);
Graph5=0;
Graph6=5000;
Graph7=10000;
Graph1Color=Graph2Color=2;
Graph0Style=Graph1Style=Graph2Style=Graph4Style=Graph5Style=Graph6Style=Graph7Style=1;
Graph3Style=4;
Graph3Color=7;

//Buy signals are generated for stocks over $4.00 when the Zig line as well as the price is increasing. This is a very simplistic trading system that could be greatly improved.
Buy=(Graph4>Ref(Graph4,-1)) AND (C>4) AND (EMA(C,20)>=Ref(EMA(C,20),-1));
//Sell signals are generated when the Zig Line is decreasing or price drops.
Sell=(Graph4<(Ref(Graph4,-1))) OR (EMA(C,3)<(Ref(EMA(C,3),-1)*.98));
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy); 
//It is assumed that transactions are made the next day after a buy/sell signal.
BuyPrice=ValueWhen(Ref(Buy,-1),Open,0);
SellPrice=ValueWhen(Ref(Sell,-1),Open,0);

6 comments

1. val2004

TKS FOR AFL

BUT I DON T GET ANY BUY OR SELL TRADING SIGNALS

WHAT COULD BE WRONG ?

2. eldertop

thanks

3. himalay137

THANKS

4. eldertop

warning: sell signals looks in to the future, buys are ok

5. zandepol

just a good tool to evaluate different indicators and profit potential.

RSI works better as usually

6. thangnd.1211

great indicator, thank a lot !

Leave Comment

Please login here to leave a comment.

Back