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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s