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 trendisyourfriend with 1 posts (0 thanks)
    3. looks_3 pbeguin with 1 posts (7 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 4,206 views
    2. thumb_up 9 thanks given
    3. group 3 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

Constructing MACDBB

  #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?
REcommedations for programming help
Sierra Chart
MC PL editor upgrade
MultiCharts
Cheap historycal L1 data for stocks
Stocks and ETFs
Trade idea based off three indicators.
Traders Hideout
How to apply profiles
Traders Hideout
 
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103



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
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG
Trading: ES, NQ, YM
Frequency: Daily
Duration: Minutes
Posts: 4,527 since Oct 2009
Thanks Given: 4,176
Thanks Received: 6,020


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, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts