MACD using Bolinger Bands
Author: thetraderman
Creation Date: 7/17/2011 3:58 PM
profile picture

thetraderman

#1
I came up this interesting indicator that uses Bolinger Bands around a MACD. They actually use little dots on the MACD signal which changes colors as the momentum accelerates in one direstion or another. They call it Bee Bee's. I'm trying to figure out how I can use crossover and crossunder to show when the MACD line itself (not MACD signal) crosses its own Bolinger Bands but I can't seem to get it to work. Maybe Cane or Eugene can take a look. I left out the exit logic not to complicate the code. I just want to know if I'm using the CrossOver/Under properly and if not how can we fix it.

One other thing, I wanted to use MACDEx to vary the inputs to MACD but the compiler says the indicator does not exist. I did not see any other inidicator in the wiki so has it been removed?

Thanks.

CODE:
Please log in to see this code.
profile picture

Eugene

#2
QUOTE:
how I can use crossover and crossunder to show when the MACD line itself (not MACD signal) crosses its own Bolinger Bands but I can't seem to get it to work.

No need for a fix: it's not broken. The MACD line itself actually crosses its own BBs.
QUOTE:
One other thing, I wanted to use MACDEx to vary the inputs to MACD but the compiler says the indicator does not exist.

Either Community Indicators library isn't installed or you didn't include a using directive (using Community.Indicators). Well, can be both at the same time.
QUOTE:
I did not see any other inidicator in the wiki so has it been removed?

No. Try searching the Wiki a bit better. Just type in "macdex" (w/o quotes) in the search box on the left side.
profile picture

thetraderman

#3
The problem is I don't get the buy and sell arrows for my back testing. I do have exit code just not posted. I should at least get the arrows, correct?
profile picture

Eugene

#4
Maybe the trades weren't included due to insufficient capital and/or data loading settings.
profile picture

thetraderman

#5
Oddly enough it shows the arrows for the intra-day charts but not the daily. I'll check again. Thanks.