NexusFi: Find Your Edge


Home Menu

 





Constructing MACDBB


Discussion in Platforms and Indicators

Updated
      Top Posters
    1. looks_one Fat Tails with 2 posts (2 thanks)
    2. looks_two pbeguin with 1 posts (7 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 skyfe with 1 posts (0 thanks)
    1. trending_up 4,722 views
    2. thumb_up 9 thanks given
    3. group 3 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
skyfe
cincinnati united states
 
Posts: 7 since Apr 2011
Thanks Given: 4
Thanks Received: 1

hi, I use OEC Trader and I was hoping you would help me turn a regular MACD indicator into a MACDBB lines indicator. thanks for reading. I was wondering if I could just add a bollinger band around the MACD somehow and turn one of the lines into dots... any help would be nice.


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Peace Deal Forward Curve: May 22%, June 51%, December 81 …
Prediction Markets & Event Contracts
Prediction Markets Lock Fed Pause at 99pct for April 29 …
Prediction Markets & Event Contracts
Iran Airspace Contract Surges to 33.5% as Project Freedo …
Prediction Markets & Event Contracts
CFTC Workforce Shrinks 24% to 15-Year Low While Predicti …
Traders Hideout
Kraken Becomes First US Digital Asset Bank With Direct F …
Cryptocurrency
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
Trying to learn Volume and price action correlation
5 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114



skyfe View Post
hi, I use OEC Trader and I was hoping you would help me turn a regular MACD indicator into a MACDBB lines indicator. thanks for reading. I was wondering if I could just add a bollinger band around the MACD somehow and turn one of the lines into dots... any help would be nice.

Had answered this question via private message. This is just a copy in case anybody else is interested.

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.

The dots just represent the raw MACD.


Reply With Quote
Thanked by:
  #4 (permalink)
 
trendisyourfriend's Avatar
 trendisyourfriend 
Quebec Canada
Legendary Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG
Trading: ES, NQ, YM
Frequency: Daily
Duration: Minutes
Posts: 4,580 since Oct 2009
Thanks Given: 4,266
Thanks Received: 6,199


Fat Tails View Post
Had answered this question via private message. This is just a copy in case anybody else is interested.

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.

The dots just represent the raw MACD.

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


Reply With Quote
  #5 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114


trendisyourfriend View Post
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 raw MACD. The histogram is the difference between the raw MACD and the signal line.

The MACDBBLines indicator does neither use the signal line nor the histogram.


Reply With Quote
Thanked by:
  #6 (permalink)
 pbeguin 
West Hills, CA
 
Experience: Beginner
Platform: OEC Trader, MC/DT
Broker: OEC
Trading: TF
Posts: 12 since Oct 2009
Thanks Given: 7
Thanks Received: 22

You can import this as an Easylanguage indicator in your OEC Trader. I can't remember where I got the original source from, I definitely don't take credit for it, but this version works fine in OEC.

 
Code
//******************************************************//
//  MacdBB 12/24/07                                     //
//******************************************************//
//
// for "Chart_Offset" I use .0005 for EC and other 4 dec symbols.
// I use .5 for the ER2 and 1.00 for the ES, equities - expirament.
//
// Imagine this will work on Radar Screen, haven't tried it.  I
// would just use the "Plot_Chart" setting and see what happens.
//
    
inputs: 
    Price(Close),
    FastLen( 12 ), 
    SlowLen( 26 ), 
    Length ( 10 ),
    StDv( 1 ),
    BB_Color_Up(Green),
    BB_Color_Dn(Red),
    Upper_Band_Color(Red),
    Lower_Band_Color(Blue),
    Zero_Color_Up(Blue),
    Zero_Color_Dn(Red);
 
VARS:
    BB_Macd(0),
    Avg(0),
    SDev(0),
    Upper_Band(0),
    Lower_Band(0),
    BB_Color(Black),      {black is meaningless - just for initialize}
    Cross_Up(False),
    Cross_Dn(False),
    Zero_Color(yellow);   {yellow is meaningless - just for initialize}

//******************************************************//
//     Main Calculations.                               //
//******************************************************//
BB_Macd = MACD( Price, FastLen, SlowLen ) * 100 ;

Avg  = XAverage( BB_Macd, Length);

SDev = StandardDev( BB_Macd, Length, 1);

Upper_Band = ( Avg + StDv * SDev );
Lower_Band = ( Avg - StDv * SDev );

//******************************************************//
//     Sub-Graph plot logic.                            //
//******************************************************//    
    
   If BB_Macd > BB_Macd[1] then BB_Color = BB_Color_Up else BB_Color = BB_Color_Dn;

   If Cross_Up = False then if BB_Macd > Upper_Band then begin
      Cross_Up = True;  
      Cross_Dn = False;  
      BB_Color = Cyan;    
      end;   
 
   If Cross_Dn = False then if BB_Macd < Lower_Band then begin
      Cross_Up = False;  
      Cross_Dn = True;  
      BB_Color = Yellow;
      end;

  If ( BB_Macd < 0 ) then Zero_Color = Zero_Color_Dn  else if
     ( BB_Macd > 0 ) then Zero_Color = Zero_Color_Up;

   Plot1( BB_Macd, "MACD Dots" ,BB_Color );    
   Plot2( Upper_Band, "Upper_Band", Upper_Band_Color );
   Plot3( Lower_Band, "Lower_Band", Lower_Band_Color );
   Plot4( 0, "Zero_Line", Zero_Color );
Once you add the imported indicator to your chart, you just have to set the Style for "MACD Dots' to Point and your indicator will look right.


Reply With Quote




Last Updated on May 3, 2011


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts