As this is quite a popular indicator i thought it might be a good idea to recreate such an indicator for IRT.

To this end, i'd like to ask a Ninja coder what is the logic behind the code of the MACD with Bollinger bands then maybe an IRT coder might take the challenge and recreate it.

Can you help answer these questions from other members on futures io?

Fat, by raw MACD do you mean the difference between the two EMA's 12 and 26 ?

Yes, the raw MACD is just the difference of the two EMAs. You then generate the signal line by smoothing the raw MACD. The signal line is just an EMA calculated from …

The following 2 users say Thank You to cory for this post:

Take a look at your DOM near BB's and you'll see there's more people camped out there than Wal Mart before Black Friday.

If you're going to use BB's for exits, consider exiting some interval prior to the BB's, because you'll find it's very difficult/stubborn to get fills on limit orders or you'll get a ton of slippage on market orders.

It has not been a problem for me on the ES, RUSSELL or the Euro although it can happen. Here is how i typically use it on the ES to take advantage of a pullback. I use two instances of the MACDBBlines and use the faster instance to gauge the overbought condition of a pullback in a directional move with momentum (evaluated with the triggerlines). For the pullback conditons, i usually wait for the faster instance of the MACD to cross the zero line opposite to the immediate trend to consider an entry.

When i started trading in 2008, i was using a fast MACD(3,6,3) to enter and fast StockRSI(8,8,3) to exit using a pyramid scheme for the money management. At that time, i was trading the Forex market with MT4. I stopped trading the Forex and switched to the Futures market (S&P 500). All of the things i was used to, did not work on the S&P 500 so as many i started a quest to find a method and found out NexGen. I subscribed to their room for 3-4 months but did not buy it in the end as i found everything i needed here free. Later on, i added Market Profile to replace the Fibonacci stuff i was used to with NexGen. All in all, i have always been using a MACD to gauge certain conditions like divergences and pullbacks. But but but, since reading BigMike's elusive price action thread and using ema's momentum bar type, i use less indicators but i still like to look at the MACD on some of the charts that i use to change the monotony of looking at the same growing grass field.

The following user says Thank You to trendisyourfriend for this post:

I took a screen capture to compare both Ninja version and yours and there seems to be a difference in the way the outside bands are processed.

Here is how the Ninja version is calculated:

Take the raw MACD (not the signal line or the histogram), then

-> calculate an EMA(10) from that MACD
-> calculate the StdDev (10) from that MACD

Typically for Bollinger Bands you calculate the standard deviation from the data points of the EMA, then add and subtract two standard deviations to get the channel lines.

In this case you will not calculate the standard deviation from the EMA, but directly from the raw MACD. Then add and subtract one standard deviation to get the bands.

In your chart, the green/red dots are the raw MACD, computed as the difference between and exponential 12 and 26 period MA, correct? I think I'm matching up fine on that part.

The center band then appears to be a 10 period exponential smoothing of the MACD line described above, correct? I seem to be lining up fine there as well...we'll call this the EMA_MACD line.

The bands are now apparently drawn around the EMA_MACD line. Some standard deviation is added to and subtracted from the EMA_MACD line. It appears it could be a 10 period standard deviation of the original MACD.