Bollinger Bands Breakout and RSI Trading System

When the RSI is above 70, and when the Price drops above the Higher Bollinger Band.When the RSI is below 30, and when the Price drops below the Lower Bollinger Band.

BUY{
SET BT = BBT(CLOSE,20,2,SIMPLE);
SET RS = RSI(CLOSE,11);
RS > 70 AND CROSSOVER(CLOSE,BT);}

SELL{
SET BB = BBB(CLOSE,20,2,SIMPLE);
SET RS = RSI(CLOSE,11);
RS < 30 AND CROSSOVER(BB,CLOSE);} 

This slideshow requires JavaScript.

Advertisements

Bollinger Bands Squeeze Breakout

The Bollinger Band Squeeze is straightforward strategy which look for securities with narrowing Bollinger Bands and low BandWidth levels. An upside bank break is bullish,
while a downside bank break is bearish. Narrowing bands infer that volatility is contracting and chartists should be prepared for a volatility expansion, which means a
directional move.

BUY : close > Keltner band top and close > bollinger band top
Sell : close < Keltner band bottom and close < bollinger band bottom

BUY{
SET KT = KCT(14,SIMPLE,1.1);
SET BT = BBT(CLOSE,10,1,SIMPLE);
CLOSE > BT AND CLOSE > KT;}

LONGEXIT{
SET BM = BBB(CLOSE,10,1,SIMPLE);
HIGH < BM;}

SELL{
SET KB = KCB(14,SIMPLE,1.1); 
SET BB = BBB(CLOSE,10,1,SIMPLE); 
CLOSE < BB AND CLOSE < KB;}

SHORTEXIT{
SET BM = BBM(CLOSE,10,1,SIMPLE);
LOW > BM;}

This slideshow requires JavaScript.

Weighted Moving Average (WMA) With Bollinger Bands

A Weighted Moving Average places more weight on recent values and less weight on older values. Bollinger bands rely on standard deviations in order to adjust to changing market conditions. When a stock becomes volatile the bands widens (move further away from the average). Conversely, when market becomes less volatile the bands contracts (move closer to the average).

SMA(CLOSE,9)  : Simple Moving Average of 9 period on Close
EMA(ma1,9)      : Exponential Moving Average of 9 period on SMA
WMA(ma2,5)    : Weighted Moving Average of 5 period on EMA

BUY{
SET ma1 = SMA(CLOSE,9);
SET ma2 = EMA(ma1,9);
SET ma3 = WMA(ma2,5);
SET vol = SMA(VOLUME,10);
SET bbt = BBT(CLOSE,10,2,SIMPLE); 
SET smab = SMA(bbt,50);
CROSSOVER(ma1,ma3) and CLOSE > bbt and VOLUME > vol and CLOSE > smab AND EMA(ma1,9) > SMA(bbt,50);}
SELL{
SET ma1 = SMA(CLOSE,9);
SET ma2 = EMA(ma1,9);
SET ma3 = WMA(ma2,5);
CROSSOVER(ma3,ma1);}

This slideshow requires JavaScript.

MACD With Bollinger Bands

We used Moving Average Convergence/Divergence (MACD) indicator to identify the direction of the market and to avoid whipsaw in a sideways market we added Bollinger Bands.

BUY : When MACD Crossed Above MACD Signal and Current High is greater than Bollinger Band Top.

SELL : When MACD Crossed Below MACD Signal and Current Low is Lower than Bollinger Band Bottom.

BUY{
SET a = MACDSignal(13,26,9,SIMPLE);
SET b = MACD(13,26,9,SIMPLE);
SET Bottom = BBB(CLOSE,12,2,SIMPLE);
SET Top = BBT(CLOSE,12,2,SIMPLE);
CROSSOVER(b,a) and HIGH>Top;}

b

SELL{
SET a = MACDSignal(13,26,9,SIMPLE);
SET b = MACD(13,26,9,SIMPLE);
SET Bottom = BBB(CLOSE,12,2,SIMPLE);
SET Top = BBT(CLOSE,12,2,SIMPLE);
CROSSOVER(a,b) and LOW<Bottom;} 

s