| 
 PureBytes Links 
Trading Reference Links 
 | 
_ SECTION_BEGIN("MACD");
r1 =  Param( "Fast avg", 12, 2, 200, 1 );
r2 =  Param( "Slow avg", 26, 2, 200, 1 );
r3 =  Param( "Signal avg", 9, 2, 200, 1 );
Plot ( ml = MACD(r1, r2), StrFormat(_SECTION_NAME()+"(%g,%g)", r1, 
r2),  ParamColor("MACD color", colorRed ), ParamStyle("MACD 
style") );
Plot ( sl = Signal(r1,r2,r3), "Signal" + _PARAM_VALUES(), ParamColor
( "Signal 
color", colorBlue ), ParamStyle("Signal style") 
);
Plot ( ml-sl, "MACD Histogram", IIf(ml-sl > 0,colorBrightGreen,colorRed ), styleNoTitle | 
ParamStyle("Histogram style", 
styleHistogram | styleNoLabel, maskHistogram ) );
_SECTION_END (); 
  ----- Original Message -----  
  
  
  Sent: Sunday, January 30, 2005 2:57 
  PM 
  Subject: [amibroker] Changing MACD 
  histogram colors 
  
 
  I've noticed in some software (such as Phrophet) the 
  MACD histogram  is in two colors; for instance Red above the mid point and 
  Green  below. I presume this can be done in AmiBroker but don't know 
  how.   The built in formula that I have is shown below.  What 
  code do I need  to paste in to make such a change? Thanks for any help 
  offered.
  _SECTION_BEGIN("MACD"); r1 = Param( "Fast avg", 12, 2, 200, 
  1 ); r2 = Param( "Slow avg", 26, 2, 200, 1 ); r3 = Param( "Signal avg", 
  9, 2, 200, 1 ); Plot( ml = MACD(r1, r2), 
  StrFormat(_SECTION_NAME()+"(%g,%g)", r1,  r2), ParamColor("MACD color", 
  colorRed ), ParamStyle("MACD style") ); Plot( sl = Signal(r1,r2,r3), 
  "Signal" + _PARAM_VALUES(), ParamColor ("Signal color", colorBlue ), 
  ParamStyle("Signal style") ); Plot( ml-sl, "MACD Histogram", 
  ParamColor("Histogram color",  colorBlack ), styleNoTitle | 
  ParamStyle("Histogram style",  styleHistogram | styleNoLabel, maskHistogram 
  ) ); _SECTION_END();
 
  Dick H. 
  
 
 
 
 
 
  Check AmiBroker web page at: http://www.amibroker.com/
  Check 
  group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  
  
  
    
  No virus found in this incoming message. Checked by AVG 
  Anti-Virus. Version: 7.0.300 / Virus Database: 265.8.1 - Release Date: 
  1/27/2005
  
  
Check AmiBroker web page at: 
http://www.amibroker.com/ 
 
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
  
 
 
Yahoo! Groups Links 
 |  
 No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.8.1 - Release Date: 1/27/2005
 
 |